Skip to content

Commit

Permalink
2023-10-26 07:33:27
Browse files Browse the repository at this point in the history
  • Loading branch information
uidHUB committed Oct 26, 2023
1 parent 122400b commit 53ac633
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
14 changes: 9 additions & 5 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
{{ ((printf "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>") | safeHTML) }}
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:dc="http://purl.org/dc/elements/1.1/">
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
<channel>
{{ if (eq (.Title) (site.Title)) }}
<title>{{ (site.Title) }}</title>
Expand All @@ -45,6 +46,8 @@
{{ with (.OutputFormats.Get "RSS") }}
{{ ((printf "<atom:link href=%q rel='self' type=%q/>" (.Permalink) (.MediaType)) | safeHTML) }}
{{ end }}
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
{{ range ($pages) }}
<item>
<title>{{ (.Title) }}</title>
Expand All @@ -53,16 +56,17 @@
<pubDate>{{ (.Date.UTC.Format "Mon, 02 Jan 2006 15:04:05 -0700") }}</pubDate>
{{ range (.Params.authors) }}
{{ with (site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .))) }}
<author>{{ (.Params.email) }} ({{ (.Title) }})</author>
{{ if (.Params.email) }}
<author>{{ (.Params.email) }} ({{ (.Title) }})</author>
{{ else }}
<dc:creator>{{ (.Title) }}</dc:creator>
{{ end }}
{{ end }}
{{ end }}
{{ range (.GetTerms "categories") }}
<category>{{ (.Title) }}</category>
{{ end }}
<guid>{{ (.Permalink) }}</guid>
{{ range (.GetTerms "authors") }}
<dc:creator>{{ (.Title) }}</dc:creator>
{{ end }}
</item>
{{ end }}
</channel>
Expand Down
7 changes: 6 additions & 1 deletion layouts/index.turbo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

{{ ((printf "<?xml version='1.0' encoding='UTF-8'?>") | safeHTML) }}
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:yandex="http://news.yandex.ru"
xmlns:turbo="http://turbo.yandex.ru">
<channel>
Expand All @@ -23,7 +24,11 @@
<pubDate>{{ (.Date.UTC.Format "Mon, 02 Jan 2006 15:04:05 -0700") }}</pubDate>
{{ range (.Params.authors) }}
{{ with (site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .))) }}
<author>{{ (.Params.email) }} ({{ (.Title) }})</author>
{{ if (.Params.email) }}
<author>{{ (.Params.email) }} ({{ (.Title) }})</author>
{{ else }}
<dc:creator>{{ (.Title) }}</dc:creator>
{{ end }}
{{ end }}
{{ end }}
{{ range (.GetTerms "categories") }}
Expand Down

0 comments on commit 53ac633

Please sign in to comment.