aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-10-04 20:52:01 -0400
committertdro <tdro@noreply.example.com>2022-10-04 20:52:01 -0400
commit621c83287d46125a7fcb238415745dc54d3464af (patch)
treecf8ccd8270665ce778b28acf7e12083275feb43c
parentd07cf2691794e2d371ca5ea529428b5f58fac024 (diff)
downloadcanory-621c83287d46125a7fcb238415745dc54d3464af.tar.gz
canory-621c83287d46125a7fcb238415745dc54d3464af.tar.bz2
canory-621c83287d46125a7fcb238415745dc54d3464af.zip
themes/default/layouts/_default/rss: Set user.name as title if available
-rw-r--r--themes/default/layouts/_default/home.xslt.xsl2
-rw-r--r--themes/default/layouts/_default/rss.xml13
2 files changed, 11 insertions, 4 deletions
diff --git a/themes/default/layouts/_default/home.xslt.xsl b/themes/default/layouts/_default/home.xslt.xsl
index 012e8b5..ebe0b88 100644
--- a/themes/default/layouts/_default/home.xslt.xsl
+++ b/themes/default/layouts/_default/home.xslt.xsl
@@ -28,7 +28,7 @@
</a>
</icon-button>
<section>
- <h2><xsl:value-of select="/rss/channel/title"/> Feed</h2>
+ <h2><xsl:value-of select="/rss/channel/title"/>'s Micro Blog Feed</h2>
<small>Web Feed Preview</small>
</section>
{{ if .Site.Menus.main }}
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml
index 6548c76..f29a8f8 100644
--- a/themes/default/layouts/_default/rss.xml
+++ b/themes/default/layouts/_default/rss.xml
@@ -24,6 +24,13 @@
{{- end -}}
{{- $author := partial "function-authors-data.html" . -}}
+
+{{- $title := partial "base-title.html" . -}}
+
+{{- if (eq .Page.Kind "section") -}}
+ {{- $title = $author.name -}}
+{{- end -}}
+
{{- $profile := $author.picture.profile -}}
{{- $file := not (urls.Parse $profile).Host -}}
@@ -46,13 +53,13 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
- <title>{{ partial "base-title.html" . }}</title>
+ <title>{{ $title }}</title>
<link>{{ .Permalink }}</link>
- <description>Recent from {{ partial "base-title.html" . }}</description>
+ <description>{{ partial "base-title.html" . }}</description>
<language>{{ .Site.LanguageCode }}</language>
<category>{{ partial "author-user.html" . }}</category>
<image>
- <title>{{ partial "base-title.html" . }}</title>
+ <title>{{ $title }}</title>
<url>{{ $image.Permalink }}</url>
<link>{{ .Permalink }}</link>
</image>