diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-16 02:13:01 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-05-16 02:13:01 +0200 |
| commit | 60a0feb39d3ec975472f12377db9182789776c10 (patch) | |
| tree | daf8fa2d4e6f9c2266ef02e5129c21cb089da4e3 /layouts/partials | |
| parent | cfc3f2c8c067d47505e64b1445c4692316fd4eb6 (diff) | |
| download | gohugo-theme-ed-60a0feb39d3ec975472f12377db9182789776c10.tar.gz | |
Simplified setting the author
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/author.html | 16 | ||||
| -rw-r--r-- | layouts/partials/team-member.html | 5 |
2 files changed, 2 insertions, 19 deletions
diff --git a/layouts/partials/author.html b/layouts/partials/author.html index ccad7e7..2bfddb3 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -7,18 +7,6 @@ {{- .Params.author }} {{- end }} {{- /* Otherwise, get site authors */}} -{{- else if site.Author }} - {{- $author_type := (printf "%T" site.Author) }} - {{- if (or (eq $author_type "map[string]string") (eq $author_type "map[string]interface {}")) }} - {{- range $i, $author := site.Author }} - {{- if (eq (printf "%T" $author) "maps.Params") }} - {{- with $author.name }}{{ $.Scratch.SetInMap "names" . . }}{{ end }} - {{- else }} - {{- $.Scratch.SetInMap "names" site.Author.name site.Author.name }} - {{- break -}} - {{- end }} - {{- end }} - {{- delimit ($.Scratch.GetSortedMapValues "names") ", " }} - {{- $.Scratch.Delete "names" -}} - {{- end }} +{{- else if site.Author.name }} + {{- site.Author.name }} {{- end -}} diff --git a/layouts/partials/team-member.html b/layouts/partials/team-member.html deleted file mode 100644 index a5e6fe7..0000000 --- a/layouts/partials/team-member.html +++ /dev/null @@ -1,5 +0,0 @@ - - Author: {{ $.member.name | default "-" }} - Contact: {{ $.member.email | default "-" }} - GitHub: {{ $.member.github | default "-" }} - From: {{ $.member.location | default "-" }} |
