mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-08 01:22:29 +00:00
Switch themes to minimo
This commit is contained in:
15
themes/minimo/layouts/partials/data/author/displayName
Normal file
15
themes/minimo/layouts/partials/data/author/displayName
Normal file
@@ -0,0 +1,15 @@
|
||||
{{- $.Scratch.Set "authorID" "" -}}
|
||||
|
||||
{{- if eq .Kind "term" -}}
|
||||
{{- $.Scratch.Set "authorID" .Data.Term -}}
|
||||
{{- else if eq .Kind "taxonomy" -}}
|
||||
{{- $.Scratch.Set "authorID" .Name -}}
|
||||
{{- else if eq .Kind "page" -}}
|
||||
{{- $.Scratch.Set "authorID" ( index .Params.authors 0 ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $lang := ( .Params.lang | default .Lang ) -}}
|
||||
{{- $author := ( index $.Site.Data.authors ( $.Scratch.Get "authorID" ) ) -}}
|
||||
{{- $i18nAuthor := ( index $author $lang ) -}}
|
||||
{{- $name := ( or $i18nAuthor.name $author.name ) -}}
|
||||
{{- $name.display -}}
|
Reference in New Issue
Block a user