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.atom.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.atom.xml')
| -rw-r--r-- | layouts/_default/list.atom.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index 75892fd..5da5f25 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -33,7 +33,7 @@ </author>{{ end }}{{ with site.Params.Copyright }}{{ $copyright := replace . "{year}" now.Year }}{{ $copyright = replace $copyright "©" "©" }} <rights>{{ $copyright | plainify }}</rights>{{ end }} <generator uri="https://gohugo.io" version="{{ hugo.Version }}">Hugo</generator>{{ if not site.LastChange.IsZero }} - <updated>{{ site.LastChange.UTC.Format site.Params.dateFormatFeed }}</updated>{{ end }}{{ $uuid := sha1 (site.BaseURL | absURL) }} + <updated>{{ site.LastChange.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>{{ end }}{{ $uuid := sha1 (site.BaseURL | absURL) }} <id>urn:uuid:{{ substr $uuid 0 8 }}-{{ substr $uuid 8 4 }}-5{{ substr $uuid 13 3 }}-{{ substr $uuid 16 1 }}9{{ substr $uuid 17 2 }}-{{ substr $uuid 21 12 }}</id>{{- range $pages }} <entry> {{- $url := .Permalink | absURL }}{{ $uuid := sha1 (.Permalink | absURL) }}{{ $page := . }} @@ -42,8 +42,8 @@ <link rel="alternate" type="type/html" href="{{ $url }}?utm_source=atom_feed" /> {{ printf `<title type="html"><![CDATA[%s]]></title>` .Title | safeHTML }}{{ range first 5 (site.RegularPages.Related .) }} <link href="{{ .Permalink }}?utm_source=atom_feed" rel="related" type="text/html" title="{{ .Title }}" />{{ end }} - <published>{{ (.PublishDate.Format site.Params.dateFormatFeed) | html }}</published>{{ if ne .Date .Lastmod }} - <updated>{{ .Lastmod.UTC.Format site.Params.dateFormatFeed }}</updated>{{ end }} + <published>{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</published>{{ if ne .Date .Lastmod }} + <updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>{{ end }} <id>urn:uuid:{{ substr $uuid 0 8 }}-{{ substr $uuid 8 4 }}-5{{ substr $uuid 13 3 }}-{{ substr $uuid 16 1 }}9{{ substr $uuid 17 2 }}-{{ substr $uuid 21 12 }}</id> {{ if .Params.author }} {{- $author_type := (printf "%T" .Params.author) }} |
