Close #220
@@ -3,6 +3,9 @@ title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = false
+# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
+authors = []
+
# Tags and categories
# For example, use `tags = []` for no tags, or the form `tags = ["A Tag", "Another Tag"]` for one or more tags.
tags = []
@@ -5,6 +5,9 @@ date = 2016-04-20T00:00:00
lastmod = 2018-01-13T00:00:00
tags = ["academic"]
summary = "Create a beautifully simple website or blog in under 10 minutes."
@@ -2,6 +2,16 @@
{{ $ := .content }}
<div class="article-metadata">
+ {{ if $.Params.authors }}
+ {{ $authorLen := len $.Params.authors }}
+ <div itemprop="author">
+ {{ range $k, $v := $.Params.authors }}
+ {{- $v -}}
+ {{- if lt $k (sub $authorLen 1) -}}, {{ end }}
+ {{ end }}
+ </div>
<span class="article-date">
{{ if ne $.Params.Lastmod $.Params.Date }}
{{ i18n "last_updated" }}