diff options
author | tdro <tdro@noreply.example.com> | 2022-08-28 02:00:48 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-08-28 02:00:48 -0400 |
commit | f21c9f431e71cd379f8d31bd008a6d8544613bce (patch) | |
tree | 8784d3b07eef2fbfcbccce2e26da930b0b219017 /themes | |
parent | 389b5e2f02dfcb1e27f3834ede4bcdccf3517d06 (diff) | |
download | canory-f21c9f431e71cd379f8d31bd008a6d8544613bce.tar.gz canory-f21c9f431e71cd379f8d31bd008a6d8544613bce.tar.bz2 canory-f21c9f431e71cd379f8d31bd008a6d8544613bce.zip |
themes/default/layouts/_default/rss.xml: Use optimized image cache
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/layouts/_default/rss.xml | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml index e6eca24..bda0455 100644 --- a/themes/default/layouts/_default/rss.xml +++ b/themes/default/layouts/_default/rss.xml @@ -5,6 +5,25 @@ {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} + +{{- $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)) + "OptimizedCopy" (print (partial "function-paths.html" "media") "/" $author.user "/" (path.BaseName $profile) ".webp") + ) +-}} + {{- print "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{ print "<?xml-stylesheet href=\"/rss.xsl\" type=\"text/xsl\"?>" | safeHTML }} @@ -17,7 +36,7 @@ <category>{{ partial "author-user" . }}</category> <image> <title>{{ partial "base-title" . }}</title> - <url>{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png</url> + <url>{{ $image.Permalink }}</url> <link>{{ .Permalink }}</link> </image> {{ if not .Date.IsZero -}} |