diff options
author | tdro <tdro@noreply.example.com> | 2022-10-04 20:52:01 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-10-04 20:52:01 -0400 |
commit | 621c83287d46125a7fcb238415745dc54d3464af (patch) | |
tree | cf8ccd8270665ce778b28acf7e12083275feb43c /themes/default/layouts/_default/rss.xml | |
parent | d07cf2691794e2d371ca5ea529428b5f58fac024 (diff) | |
download | canory-621c83287d46125a7fcb238415745dc54d3464af.tar.gz canory-621c83287d46125a7fcb238415745dc54d3464af.tar.bz2 canory-621c83287d46125a7fcb238415745dc54d3464af.zip |
themes/default/layouts/_default/rss: Set user.name as title if available
Diffstat (limited to 'themes/default/layouts/_default/rss.xml')
-rw-r--r-- | themes/default/layouts/_default/rss.xml | 13 |
1 files changed, 10 insertions, 3 deletions
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> |