diff options
Diffstat (limited to 'layouts/term.atom.xml')
| -rw-r--r-- | layouts/term.atom.xml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/term.atom.xml b/layouts/term.atom.xml index 3b5a1ca..88f56ef 100644 --- a/layouts/term.atom.xml +++ b/layouts/term.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 }}atom.xml" rel="self" /> <link href="{{ .Permalink }}" 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 }} |
