summaryrefslogtreecommitdiffstats
path: root/layouts/_default/home.feed.xml
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-22 20:01:48 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-22 20:01:48 +0200
commit36150b5f88b2e513c6791b62aaf5eb3401d1c8a2 (patch)
tree3371e3a1e40458297c3e190b537f3d476752212f /layouts/_default/home.feed.xml
parentaa0c41042a3a8bfa6834d0bedbd0b5bb7eece762 (diff)
downloadgohugo-theme-ed-36150b5f88b2e513c6791b62aaf5eb3401d1c8a2.tar.gz
Rework feeds to provide support for section
Diffstat (limited to 'layouts/_default/home.feed.xml')
-rw-r--r--layouts/_default/home.feed.xml45
1 files changed, 0 insertions, 45 deletions
diff --git a/layouts/_default/home.feed.xml b/layouts/_default/home.feed.xml
deleted file mode 100644
index 714bc07..0000000
--- a/layouts/_default/home.feed.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-{{ safeHTML "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" }}
-<rss version="2.0"
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:atom="http://www.w3.org/2005/Atom"
- xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
- xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
- xmlns:media="http://search.yahoo.com/mrss/"
- xml:lang="{{ site.LanguageCode }}">
- <channel>
- {{ printf `<title type="html"><![CDATA[%s RSS 2.0]]></title>` site.Title | safeHTML }}
- </channel>
- <link type="text/html">{{ site.BaseURL | absURL }}</link>
- {{ $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) }}{{ $logo = $logo.Resize "96x96" }}
- <image>
- <url>{{ $logo.Permalink | absURL }}</url>
- {{ printf `<title type="html"><![CDATA[%s RSS 2.0]]></title>` site.Title | safeHTML }}
- <link>{{ site.BaseURL | absURL }}</link>
- <width>{{ $logo.Width }}</width>
- <height>{{ $logo.Height }}</height>
- </image>
- <link href="{{ site.BaseURL | absURL }}" type="text/html" />
- {{ with site.Home.OutputFormats.Get "FEED"}}<atom:link href="{{ .Permalink | absURL }}" rel="self" type="{{ .MediaType.Type | html }}" />{{end}}
- {{ with site.Home.OutputFormats.Get "ATOM"}}<atom:link href="{{ .Permalink | absURL }}" rel="alternate" type="{{ .MediaType.Type | html }}" />{{end}}
- {{ with site.Home.OutputFormats.Get "JSON"}}<link href="{{ .Permalink | absURL }}" rel="alternate" type="{{ .MediaType.Type | html }}" />{{end}}
- {{ with site.Params.description }}{{ printf `<description type="html"><![CDATA[%s]]></description>` . | safeHTML }}{{ end }}
- <generator>Hugo {{ hugo.Version }}</generator>
- {{ with site.Author.name }}{{ printf `<dc:creator type="html"><![CDATA[%s]]></dc:creator>` . | safeHTML }}{{ end }}
- {{ with site.LanguageCode }}<language>{{ . }}</language>{{ end }}
- {{ with site.Params.Copyright }}{{ printf `<copyright type="html"><![CDATA[%s]]></copyright>` . | safeHTML }}{{ end }}
- {{ if not site.LastChange.IsZero }}<lastBuildDate>{{ site.LastChange.UTC.Format site.Params.dateFormatRFC822Z | html }}</lastBuildDate>{{ end }}
- {{ $feedsize := site.Params.feedSize | default 25 }}
- {{- range first $feedsize (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections) }}
- <item>
- {{ printf `<title type="html"><![CDATA[%s]]></title>` .Title | safeHTML }}
- <link>{{ .Permalink | absURL }}</link>
- <pubDate>{{ .PublishDate.UTC.Format site.Params.dateFormatRFC822Z | html }}</pubDate>
- <category>{{ .Section }}</category>
- {{ range (.GetTerms "tags") }}<category>{{ .LinkTitle }}</category>{{end}}
- <guid isPermaLink="false">{{ md5 .Permalink }}</guid>
- {{ printf `<description type="html"><![CDATA[%s]]></description>` .Summary | safeHTML }}
- </item>
- {{ end }}
-</rss>