Fix RSS item author to be email

master
Will Faught 2 years ago
parent 9665e6566e
commit c133d20c89

@ -41,13 +41,14 @@
{{ range $pages }} {{ range $pages }}
<item> <item>
{{ with partial "paige/authors.html" . }} {{ with partial "paige/authors.html" . }}
{{ $authors := slice }} {{ $primary := index . 0 }}
{{ $author := "" }}
{{ range . }} {{ if and $primary.name $primary.email }}
{{ $authors = $authors | append .name }} {{ $author = printf `%s <%s>` $primary.name $primary.email }}
{{ end }} {{ else if $primary.email }}
{{ $author = $primary.email }}
<author>{{ delimit $authors ", " }}</author> {{ end }}
<author>{{ $author }}</author>
{{ end }} {{ end }}
{{ if .Content }} {{ if .Content }}
<description>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</description> <description>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</description>

Loading…
Cancel
Save