aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-11-21 15:42:01 -0500
committertdro <tdro@noreply.example.com>2023-11-21 15:42:01 -0500
commit6d7dec46271651785443321fc26344b355d8bd98 (patch)
tree37a961f2a4e10d774e7af9457ef812d5fbb4c04a /themes/default/layouts
parent87ab00cf096cc9cb954994592e6c030c497db1d6 (diff)
downloadcanory-6d7dec46271651785443321fc26344b355d8bd98.tar.gz
canory-6d7dec46271651785443321fc26344b355d8bd98.tar.bz2
canory-6d7dec46271651785443321fc26344b355d8bd98.zip
themes/default/layouts/partials/base-discovery: Cover all page types
Diffstat (limited to 'themes/default/layouts')
-rw-r--r--themes/default/layouts/_default/rss.xml2
-rw-r--r--themes/default/layouts/partials/base-discovery.html34
2 files changed, 28 insertions, 8 deletions
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml
index bd7090e..78161da 100644
--- a/themes/default/layouts/_default/rss.xml
+++ b/themes/default/layouts/_default/rss.xml
@@ -58,7 +58,7 @@
xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
- <title>{{ $title }}</title>
+ <title>{{ or $title (title .Section) }}</title>
<link>{{ .Permalink }}</link>
<description>{{ $description }}</description>
<language>{{ .Site.LanguageCode }}</language>
diff --git a/themes/default/layouts/partials/base-discovery.html b/themes/default/layouts/partials/base-discovery.html
index 23d3a09..69406ef 100644
--- a/themes/default/layouts/partials/base-discovery.html
+++ b/themes/default/layouts/partials/base-discovery.html
@@ -7,11 +7,30 @@
{{- $author := partial "function-authors-data.html" (dict "Data" $authorData) -}}
+{{- with (eq .Page.Kind "home") -}}
+<link
+ rel="alternate"
+ type="application/rss+xml"
+ title="{{ $.Site.Title }} Feed"
+ href="{{ "" | absURL }}/rss.xml"
+/>
+
+ {{- range $author := $.Site.Sections }}
+ <link
+ rel="alternate"
+ type="application/rss+xml"
+ title="{{ $author.Page.Type }}'s Feed"
+ href="{{ print $author.Permalink "rss.xml" | absURL }}"
+ />
+ {{ end }}
+{{- end -}}
+
+{{- with (eq .Page.Kind "section") -}}
<link
rel="alternate"
type="application/rss+xml"
title="{{ $author.name }}'s Feed"
- href="{{ .Site.BaseURL }}/{{ $author.user }}/rss.xml"
+ href="{{ print ("" | absURL) "/" $.Section }}/rss.xml"
/>
{{- with $author.feeds.rss }}
@@ -29,21 +48,22 @@
/>
{{ end }}
{{ end }}
+{{- end -}}
-{{- if (eq .Page.Kind "taxonomy") -}}
+{{- with (eq .Page.Kind "taxonomy") -}}
<link
rel="alternate"
type="application/rss+xml"
- title="{{ .Title }} Feed"
- href="{{ .Permalink }}rss.xml"
+ title="{{ $.Title }} Feed"
+ href="{{ $.Permalink }}rss.xml"
/>
{{- end -}}
-{{- if (eq .Page.Kind "term") -}}
+{{- with (eq .Page.Kind "term") -}}
<link
rel="alternate"
type="application/rss+xml"
- title="#{{ lower .Title }} Tag Feed"
- href="{{ .Permalink }}rss.xml"
+ title="#{{ lower $.Title }} Tag Feed"
+ href="{{ $.Permalink }}rss.xml"
/>
{{- end }}