aboutsummaryrefslogtreecommitdiff
path: root/layouts/term.gemini_atom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/term.gemini_atom.xml')
-rw-r--r--layouts/term.gemini_atom.xml10
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/term.gemini_atom.xml b/layouts/term.gemini_atom.xml
index 5341d32..0dbf41d 100644
--- a/layouts/term.gemini_atom.xml
+++ b/layouts/term.gemini_atom.xml
@@ -5,9 +5,12 @@
{{- $authorName = . }}
{{- end }}
{{- else }}
- {{- $authorName = . }}
+ {{- $authorName = . }}
{{- end }}
{{- end }}
+{{- if not $authorName }}
+ {{- errorf "Missing author" }}
+{{- end }}
{{- $authorEmail := "" }}
{{- with site.Params.author }}
@@ -30,12 +33,11 @@
<updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
<link href="{{ .Permalink | replaceRE `index.gmi$` "atom.xml" | safeURL }}" rel="self" />
<link href="{{ .Permalink | strings.TrimSuffix "index.gmi" | safeURL }}" rel="alternate" />
- {{- with $authorName }}
<author>
- <name>{{ . }}</name>
+ <name>{{ $authorName }}</name>
{{- with $authorEmail }}
<email>{{ . }}</email>{{ end }}
- </author>{{ end }}
+ </author>
<generator>Hugo -- gohugo.io</generator>
<rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights>
<subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }}