Skip to content

Commit

Permalink
[PATCH] tpl/tplimpl: Update RSS template
Browse files Browse the repository at this point in the history
- Use publication date for pubdate
- Include version in generator element

cherry-picked from gohugoio/hugo@f0a26cf
  • Loading branch information
jmooring authored and adityatelange committed Apr 13, 2024
1 parent beb281a commit 74ceb5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<link>{{ index . 0 | absURL }}</link>
</image>
{{- end }}
<generator>Hugo -- gohugo.io</generator>
<generator>Hugo -- {{ hugo.Version }}</generator>
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
Expand All @@ -69,7 +69,7 @@
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
Expand Down

0 comments on commit 74ceb5e

Please sign in to comment.