summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--exampleSite/config.toml10
-rw-r--r--layouts/index.humanstxt.txt5
-rw-r--r--layouts/partials/team-member.html8
3 files changed, 17 insertions, 6 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 3b0953c..b72b5ee 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -24,7 +24,15 @@ enableRobotsTXT = true
# baseName = "feed"
# isPlainText = false
-# Possible 'Author' format is:
+# Possible 'Author' formats are:
+#
+# [author]
+# name = 'John Doe'
+# email = 'john@example.com'
+# github = '@john_doe'
+# location = 'Kyiv, Ukraine'
+#
+# OR
#
# [author]
# [author.john_doe]
diff --git a/layouts/index.humanstxt.txt b/layouts/index.humanstxt.txt
index dd475bd..0b25434 100644
--- a/layouts/index.humanstxt.txt
+++ b/layouts/index.humanstxt.txt
@@ -9,6 +9,9 @@ CONGRATULATIONS, you found my humans.txt file!
{{ 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 }}
@@ -16,7 +19,7 @@ CONGRATULATIONS, you found my humans.txt file!
/* SITE */
- Last update: {{ now.Format "2006-01-02" }}
+ Last update: {{ now.Format "2006/01/02" }}
Language: {{ range $i, $l := site.Languages }}{{ if $i }}, {{ end }}{{ .LanguageName }}{{ end }}
Doctype: HTML5
Standards: HTML5, CSS3, Open Graph protocol, Schema.org
diff --git a/layouts/partials/team-member.html b/layouts/partials/team-member.html
index f425f33..a5e6fe7 100644
--- a/layouts/partials/team-member.html
+++ b/layouts/partials/team-member.html
@@ -1,5 +1,5 @@
- Author: {{ .context.Name | default "-" }}
- Contact: {{ .context.Email | default "-" }}
- GitHub: {{ .context.GitHub | default "-" }}
- From: {{ .context.Location | default "-" }}
+ Author: {{ $.member.name | default "-" }}
+ Contact: {{ $.member.email | default "-" }}
+ GitHub: {{ $.member.github | default "-" }}
+ From: {{ $.member.location | default "-" }}