diff options
Diffstat (limited to 'themes/default/layouts/_default/rss.xml')
-rw-r--r-- | themes/default/layouts/_default/rss.xml | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml index 2925201..9206978 100644 --- a/themes/default/layouts/_default/rss.xml +++ b/themes/default/layouts/_default/rss.xml @@ -24,23 +24,14 @@ {{- $description = print .Site.Title " Tags: #" .Title -}} {{- end -}} -{{- $profile := $author.picture.profile -}} -{{- $file := not (urls.Parse $profile).Host -}} +{{- $image := print "/" (partial "function-paths.html" "media") + "/" $author.user "/" $author.user "-profile" (path.Ext $author.picture.profile) +-}} -{{- if $file -}} - {{- $profile = print $author.user "/" $profile -}} +{{- if not (fileExists (print "public/" $image)) -}} + {{- $image = "/data/media/404.png" -}} {{- end -}} -{{- $image := partial "function-caches-images.html" - (dict - "Source" $profile - "Fit" "160x160" - "Target" (print (partial "function-paths.html" "media") "/" $author.user "/") - "Copy" (print (partial "function-paths.html" "media") "/" $author.user "/" (path.Base $profile)) - "AlternateCopy" (print (partial "function-paths.html" "media") "/" $author.user "/" (path.BaseName $profile) ".webp") - ) --}} - {{- $atomSelf := "" -}} {{- $atomPrevious := "" -}} {{- $atomNext := "" -}} @@ -76,7 +67,7 @@ <lastBuildDate>{{ $lastBuildDate }}</lastBuildDate> <image> <title>{{ $title }}</title> - <url>{{ $image.Permalink }}</url> + <url>{{ .Site.BaseURL }}{{ $image }}</url> <link>{{ .Permalink }}</link> </image> @@ -87,24 +78,16 @@ {{ range first $limit $filteredPages -}} {{- $author = partial "function-authors-data.html" . -}} - {{- $profile = $author.picture.profile -}} - {{- $file = not (urls.Parse $profile).Host -}} - {{- if $file -}} - {{- $profile = print $author.user "/" $profile -}} - {{- end -}} - - {{- $image = partial "function-caches-images.html" - (dict - "Source" $profile - "Fit" "160x160" - "Target" (print (partial "function-paths.html" "media") "/" $author.user "/") - "Copy" (print (partial "function-paths.html" "media") "/" $author.user "/" (path.Base $profile)) - "AlternateCopy" (print (partial "function-paths.html" "media") "/" $author.user "/" (path.BaseName $profile) ".webp") - ) + {{- $image = print "/" (partial "function-paths.html" "media") + "/" $author.user "/" $author.user "-profile" (path.Ext $author.picture.profile) -}} - {{- $atomAuthorUri := $image.Permalink -}} + {{- if not (fileExists (print "public/" $image)) -}} + {{- $image = "/data/media/404.png" -}} + {{- end -}} + + {{- $atomAuthorUri := print .Site.BaseURL $image -}} {{- $atomAuthorName := or .Params.Feed.name $author.name -}} {{- if .Params.Feed.favicon -}} |