diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-06-03 12:51:52 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-06-03 12:52:23 +0200 |
| commit | 6c6b1bd1035ae68a18bd83faf7ff1297ead60e8c (patch) | |
| tree | 0a9b6c3388af549cd7d59b6e680837d31d9dc3b2 /layouts/_default/list.feed.xml | |
| parent | 1283f3d31243d1ac63ce718c4039ba6b85f5d721 (diff) | |
| download | gohugo-theme-ed-6c6b1bd1035ae68a18bd83faf7ff1297ead60e8c.tar.gz | |
Do not allow modification of date formats that are required by spec
Diffstat (limited to 'layouts/_default/list.feed.xml')
| -rw-r--r-- | layouts/_default/list.feed.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/list.feed.xml b/layouts/_default/list.feed.xml index ae16aca..d66688b 100644 --- a/layouts/_default/list.feed.xml +++ b/layouts/_default/list.feed.xml @@ -14,7 +14,7 @@ {{- $limit := site.Params.feedSize | default 25 -}} {{- $pages = $pages | first $limit -}} -{{- safeHTML "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" }} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }} <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" @@ -49,11 +49,11 @@ {{ printf `<dc:creator type="html"><![CDATA[%s]]></dc:creator>` . | safeHTML }}{{ end }}{{ with site.LanguageCode }} <language>{{ . }}</language>{{ end }}{{ with site.Params.Copyright }}{{ $copyright := replace . "{year}" now.Year }}{{ $copyright = replace $copyright "©" "©" }} <copyright>{{ $copyright | plainify }}</copyright>{{ end }}{{ if not site.LastChange.IsZero }} - <lastBuildDate>{{ site.LastChange.UTC.Format site.Params.dateFormatRFC822Z | html }}</lastBuildDate>{{ end }}{{- range $pages }} + <lastBuildDate>{{ site.LastChange.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}{{- range $pages }} <item> {{ printf `<title type="html"><![CDATA[%s]]></title>` .Title | safeHTML }} <link>{{ .Permalink | absURL }}?utm_source=rss_feed</link> - <pubDate>{{ .PublishDate.UTC.Format site.Params.dateFormatRFC822Z | html }}</pubDate> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <category>{{ .Section }}</category>{{ range (.GetTerms "tags") }} <category>{{ .LinkTitle }}</category>{{end}} <guid isPermaLink="false">{{ md5 .Permalink }}</guid> |
