aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2024-02-24 18:33:47 -0500
committertdro <tdro@noreply.example.com>2024-02-24 18:33:47 -0500
commit07dc8aee3651dd68a741055a8edb5de5b361999e (patch)
tree46e2470060e4c07d0f45a5b57ccae9eab07996e1 /themes/default/layouts
parent71ec9f2c5f0e99a8622f81e09bfd4111238b99f2 (diff)
downloadcanory-07dc8aee3651dd68a741055a8edb5de5b361999e.tar.gz
canory-07dc8aee3651dd68a741055a8edb5de5b361999e.tar.bz2
canory-07dc8aee3651dd68a741055a8edb5de5b361999e.zip
themes/default/layouts/_default/rss: Fix null violation
Diffstat (limited to 'themes/default/layouts')
-rw-r--r--themes/default/layouts/_default/rss.xml8
1 files changed, 3 insertions, 5 deletions
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml
index 5f9877e..a103543 100644
--- a/themes/default/layouts/_default/rss.xml
+++ b/themes/default/layouts/_default/rss.xml
@@ -17,10 +17,12 @@
{{- $title := partial "head-title.html" . -}}
{{- $description := partial "head-title.html" . -}}
{{- $author := partial "function-authors-data.html" . -}}
+{{- $image := print "/favicon.ico" -}}
{{- if (eq .Page.Kind "section") -}}
{{- $title = $author.name -}}
{{- $description = $author.description | markdownify | html | htmlUnescape -}}
+ {{- $image = print "/" (partial "function-paths.html").media "/" .Section "/" .Section "-profile" (path.Ext $author.picture.profile) -}}
{{- end -}}
{{- if (eq .Page.Type "tags") -}}
@@ -28,10 +30,6 @@
{{- $description = print .Site.Title " Tags: #" .Title -}}
{{- end -}}
-{{- $image := print "/" (partial "function-paths.html").media
- "/" $author.user "/" $author.user "-profile" (path.Ext $author.picture.profile)
--}}
-
{{- $atomSelf := "" -}}
{{- $atomPrevious := "" -}}
{{- $atomNext := "" -}}
@@ -62,7 +60,7 @@
<link>{{ .Permalink }}</link>
<description>{{ $description }}</description>
<language>{{ .Site.LanguageCode }}</language>
- <category>{{ $author.user }}</category>
+ <category>{{ or $author.user "default" }}</category>
<generator>Hugo {{ hugo.Version }}</generator>
<lastBuildDate>{{ $lastBuildDate }}</lastBuildDate>
<image>