aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-12-10 21:45:19 -0500
committertdro <tdro@noreply.example.com>2022-12-10 21:45:19 -0500
commit1c4b496c3f12e35d585322261d044bcd9a018f59 (patch)
tree6cef0dd4d834a3332094af27dbfd4980680f95cf
parent552d06867ed2b7f0811fde0338d220bc1ae1b304 (diff)
downloadcanory-1c4b496c3f12e35d585322261d044bcd9a018f59.tar.gz
canory-1c4b496c3f12e35d585322261d044bcd9a018f59.tar.bz2
canory-1c4b496c3f12e35d585322261d044bcd9a018f59.zip
themes/default/layouts/_default/rss.xml: Fix tag feeds
Increase discovery
-rw-r--r--themes/default/layouts/_default/rss.xml7
-rw-r--r--themes/default/layouts/partials/base-discovery.html18
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 }}