diff --git a/layouts/_default/list.atom b/layouts/_default/list.atom index dae3723..b630465 100644 --- a/layouts/_default/list.atom +++ b/layouts/_default/list.atom @@ -1,22 +1,28 @@ - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ if not .Date.IsZero }} {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}{{ end }} - {{ .Permalink }}{{ with .Site.Author.name }} - - {{.}}{{ with $.Site.Author.email }} - {{.}}{{end}} - {{end}} + {{ .Permalink }} + {{ with .Site.Params.author }} + {{ $author := index $.Site.Data.authors . }} + + {{ $author.name }} + {{ $author.email }} + + {{end}} Hugo -- gohugo.io {{ range where .Pages "Type" "post" }} {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> - {{ .Permalink }}{{ with .Site.Params.Author }} - - {{.}} - {{end}} + {{ .Permalink }} + {{ with .Params.Author }} + {{ $author := index $.Site.Data.authors . }} + + {{ $author.name }} + + {{end}} {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ ` diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index dae3723..b630465 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -1,22 +1,28 @@ - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ if not .Date.IsZero }} {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}{{ end }} - {{ .Permalink }}{{ with .Site.Author.name }} - - {{.}}{{ with $.Site.Author.email }} - {{.}}{{end}} - {{end}} + {{ .Permalink }} + {{ with .Site.Params.author }} + {{ $author := index $.Site.Data.authors . }} + + {{ $author.name }} + {{ $author.email }} + + {{end}} Hugo -- gohugo.io {{ range where .Pages "Type" "post" }} {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> - {{ .Permalink }}{{ with .Site.Params.Author }} - - {{.}} - {{end}} + {{ .Permalink }} + {{ with .Params.Author }} + {{ $author := index $.Site.Data.authors . }} + + {{ $author.name }} + + {{end}} {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ ` diff --git a/layouts/_default/list.html b/layouts/_default/list.html index fcf6b57..13214bb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -24,10 +24,9 @@ {{ with .Params.Author }} - {{ $key := . }} - {{ $author := index $.Site.Data.authors $key }} + {{ $author := index $.Site.Data.authors . }} - {{ with $.Site.GetPage (printf "/authors/%s" $author.name | urlize) }} + {{ with $.Site.GetPage (printf "/author/%s" $author.name | urlize) }}