From 07dc8aee3651dd68a741055a8edb5de5b361999e Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 24 Feb 2024 18:33:47 -0500 Subject: themes/default/layouts/_default/rss: Fix null violation --- themes/default/layouts/_default/rss.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'themes/default/layouts') 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 @@ {{ .Permalink }} {{ $description }} {{ .Site.LanguageCode }} - {{ $author.user }} + {{ or $author.user "default" }} Hugo {{ hugo.Version }} {{ $lastBuildDate }} -- cgit v1.2.3