diff options
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/index.humanstxt.txt | 22 | ||||
| -rw-r--r-- | layouts/partials/author.html | 16 | ||||
| -rw-r--r-- | layouts/partials/team-member.html | 5 |
3 files changed, 8 insertions, 35 deletions
diff --git a/layouts/index.humanstxt.txt b/layouts/index.humanstxt.txt index 0b25434..93e794b 100644 --- a/layouts/index.humanstxt.txt +++ b/layouts/index.humanstxt.txt @@ -1,20 +1,10 @@ -CONGRATULATIONS, you found my humans.txt file! - -─────────────────────────────────────────────────────────────────────────────── - -{{ with site.Author }} - {{- $author_type := (printf "%T" site.Author) }} - {{- if (or (eq $author_type "map[string]string") (eq $author_type "map[string]interface {}")) }} +{{- with site.Author.name }} /* TEAM */ - {{ range $i, $member := site.Author }} - {{- if (eq (printf "%T" $member) "maps.Params") }} - {{- partial "team-member.html" (dict "context" . "member" $member) -}} - {{- else if (eq (printf "%T" $member) "string") }} - {{- partial "team-member.html" (dict "context" . "member" site.Author) -}} - {{- break -}} - {{- end }} - {{- end }} - {{- end }} + + Author: {{ . }} +{{ with site.Author.email }} Contact: {{ . }}{{ end }} +{{ with site.Author.github }} GitHub: {{ . }}{{ end }} +{{ with site.Author.location }} From: {{ . }}{{ end }} {{- end }} /* SITE */ 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 "-" }} |
