From 82d9181cb40cba312ea824d91d1d358c3b657190 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 22 May 2022 22:51:17 +0200 Subject: Reformat feeds --- layouts/_default/list.atom.xml | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'layouts/_default/list.atom.xml') diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index dc14748..5629534 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -13,7 +13,7 @@ {{- $limit := site.Params.feedSize | default 25 -}} {{- $pages = $pages | first $limit -}} -{{- safeHTML "" }} +{{- safeHTML "" }} {{ printf `<![CDATA[%s]]>` (partial "title.html" .) | safeHTML }} {{ with site.Params.description }}{{ printf `` . | safeHTML }}{{ end }} @@ -25,30 +25,24 @@ {{- end -}} {{- end }} {{ $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png") }}{{ $logo = $logo.Resize "96x96" }}{{ $logo.Permalink | absURL }} - {{ $logo.Permalink | absURL }} - {{ with site.Author.name }} + {{ $logo.Permalink | absURL }}{{ with site.Author.name }} + {{ printf `` . | safeHTML }} {{ with site.Author.email }}{{ . | html }}{{ end }} - {{ end }} - {{ with site.Params.Copyright }} - {{- $copyright := replace . "{year}" now.Year -}} - {{- $copyright = replace $copyright "©" "©" }}{{ $copyright | plainify }}{{ end }} - Hugo - {{ if not site.LastChange.IsZero }}{{ site.LastChange.UTC.Format site.Params.dateFormatFeed }}{{ end }} - {{ $uuid := sha1 (site.BaseURL | absURL) }}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 }} - {{- range $pages }} + {{ end }}{{ with site.Params.Copyright }}{{ $copyright := replace . "{year}" now.Year }}{{ $copyright = replace $copyright "©" "©" }} + {{ $copyright | plainify }}{{ end }} + Hugo{{ if not site.LastChange.IsZero }} + {{ site.LastChange.UTC.Format site.Params.dateFormatFeed }}{{ end }}{{ $uuid := sha1 (site.BaseURL | absURL) }} + 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 }}{{- range $pages }} {{- $url := .Permalink | absURL }}{{ $uuid := sha1 (.Permalink | absURL) }}{{ $page := . }} - - {{ range (.GetTerms "tags") }}{{ end }} + {{ range (.GetTerms "tags") }} + {{ end }} - {{ printf `<![CDATA[%s]]>` .Title | safeHTML }} - {{/* rel=related: See https://validator.w3.org/feed/docs/atom.html#link */}} - {{- range first 5 (site.RegularPages.Related .) }} - - {{- end }} - {{ (.PublishDate.Format site.Params.dateFormatFeed) | html }} - {{ if ne .Date .Lastmod }}{{ .Lastmod.UTC.Format site.Params.dateFormatFeed }}{{ end }} + {{ printf `<![CDATA[%s]]>` .Title | safeHTML }}{{ range first 5 (site.RegularPages.Related .) }} + {{ end }} + {{ (.PublishDate.Format site.Params.dateFormatFeed) | html }}{{ if ne .Date .Lastmod }} + {{ .Lastmod.UTC.Format site.Params.dateFormatFeed }}{{ end }} 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 }} {{ if .Params.author }} {{- $author_type := (printf "%T" .Params.author) }} @@ -65,6 +59,5 @@ {{- end }} {{ end }} {{ printf `` .Summary | safeHTML }} - - {{- end }} + {{ end }} -- cgit v1.2.3