From 36150b5f88b2e513c6791b62aaf5eb3401d1c8a2 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 22 May 2022 20:01:48 +0200 Subject: Rework feeds to provide support for section --- layouts/_default/home.atom.xml | 47 ------------------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 layouts/_default/home.atom.xml (limited to 'layouts/_default/home.atom.xml') diff --git a/layouts/_default/home.atom.xml b/layouts/_default/home.atom.xml deleted file mode 100644 index 575b2df..0000000 --- a/layouts/_default/home.atom.xml +++ /dev/null @@ -1,47 +0,0 @@ -{{ safeHTML "" }} - - {{ printf `<![CDATA[%s]]>` site.Title | safeHTML }} - {{ with site.Params.description }}{{ printf `` . | safeHTML }}{{ end }} - - {{ with site.Home.OutputFormats.Get "ATOM" }}{{ end }} - {{ with site.Home.OutputFormats.Get "FEED"}}{{end}} - {{ with site.Home.OutputFormats.Get "JSON"}}{{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 }} - {{ printf `` . | safeHTML }} - {{ with site.Author.email }}{{ . | html }}{{ end }} - {{ end }} - {{ with site.Params.Copyright }}{{ printf `` . | safeHTML }}{{ 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 }} - {{ $feedsize := site.Params.feedSize | default 25 }} - {{- range first $feedsize (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections) }} - - {{- $url := .Permalink | absURL }}{{ $uuid := sha1 (.Permalink | absURL) }}{{ $page := . }} - - {{ range (.GetTerms "tags") }}{{ end }} - - {{ printf `<![CDATA[%s]]>` .Title | safeHTML }} - {{ (.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) }} - {{- if eq $author_type "string" }} - - {{ .Params.author }} - - {{- else if eq $author_type "[]string" }} - {{ range .Params.author }} - - {{ .Name }} - - {{ end }} - {{- end }} - {{ end }} - {{ printf `` .Summary | safeHTML }} - - {{- end }} - -- cgit v1.2.3