diff options
author | tdro <tdro@noreply.example.com> | 2022-12-10 21:45:19 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-12-10 21:45:19 -0500 |
commit | 1c4b496c3f12e35d585322261d044bcd9a018f59 (patch) | |
tree | 6cef0dd4d834a3332094af27dbfd4980680f95cf /themes/default/layouts | |
parent | 552d06867ed2b7f0811fde0338d220bc1ae1b304 (diff) | |
download | canory-1c4b496c3f12e35d585322261d044bcd9a018f59.tar.gz canory-1c4b496c3f12e35d585322261d044bcd9a018f59.tar.bz2 canory-1c4b496c3f12e35d585322261d044bcd9a018f59.zip |
themes/default/layouts/_default/rss.xml: Fix tag feeds
Increase discovery
Diffstat (limited to 'themes/default/layouts')
-rw-r--r-- | themes/default/layouts/_default/rss.xml | 7 | ||||
-rw-r--r-- | themes/default/layouts/partials/base-discovery.html | 18 |
2 files changed, 24 insertions, 1 deletions
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml index 01f2aa6..2925201 100644 --- a/themes/default/layouts/_default/rss.xml +++ b/themes/default/layouts/_default/rss.xml @@ -19,6 +19,11 @@ {{- $description = $author.description | markdownify | html | htmlUnescape -}} {{- end -}} +{{- if (eq .Page.Type "tags") -}} + {{- $title = print "#" (lower .Title) " -- " .Site.Title | markdownify | htmlUnescape -}} + {{- $description = print .Site.Title " Tags: #" .Title -}} +{{- end -}} + {{- $profile := $author.picture.profile -}} {{- $file := not (urls.Parse $profile).Host -}} @@ -107,7 +112,7 @@ {{- end -}} <item> - <title>{{ .Summary | htmlUnescape }}</title> + <title>{{ (or .Summary .Title) | htmlUnescape }}</title> <link>{{ .Permalink }}</link> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <guid>{{ .Permalink }}</guid> diff --git a/themes/default/layouts/partials/base-discovery.html b/themes/default/layouts/partials/base-discovery.html index 4370063..0cd956a 100644 --- a/themes/default/layouts/partials/base-discovery.html +++ b/themes/default/layouts/partials/base-discovery.html @@ -30,4 +30,22 @@ href="{{ $url }}" /> {{ end }} +{{ end }} + +{{- if (eq .Page.Kind "taxonomy") -}} +<link + rel="alternate" + type="application/rss+xml" + title="{{ .Title }} Feed" + href="{{ .Permalink }}rss.xml" +/> {{- end -}} + +{{- if (eq .Page.Kind "term") -}} +<link + rel="alternate" + type="application/rss+xml" + title="#{{ lower .Title }} Tag Feed" + href="{{ .Permalink }}rss.xml" +/> +{{- end }} |