diff options
author | tdro <tdro@noreply.example.com> | 2023-05-07 05:29:12 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-05-07 05:30:01 -0400 |
commit | 39b67f04cacd6d788e902188e7daf71b47ec1219 (patch) | |
tree | b60fb0a9864965b0e636a3d9288bccfb5aa8d507 /themes | |
parent | 885c2368e3072eb91a0dcc47a4cdb45c5fa2f45a (diff) | |
download | canory-39b67f04cacd6d788e902188e7daf71b47ec1219.tar.gz canory-39b67f04cacd6d788e902188e7daf71b47ec1219.tar.bz2 canory-39b67f04cacd6d788e902188e7daf71b47ec1219.zip |
themes/default/layouts/_default/rss.xml: Ensure absolute links
By switching to absURL function
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/layouts/_default/rss.xml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/themes/default/layouts/_default/rss.xml b/themes/default/layouts/_default/rss.xml index 3e8e337..c7bba6d 100644 --- a/themes/default/layouts/_default/rss.xml +++ b/themes/default/layouts/_default/rss.xml @@ -1,5 +1,7 @@ {{- define "main" -}} +{{- $absURL := "" | absURL -}} + {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if lt $limit 1 -}} @@ -42,11 +44,11 @@ {{- $atomSelf = printf `<atom:link rel="self" href=%q type=%q />` .Permalink .MediaType | safeHTML -}} {{- with $.Paginator.Prev -}} - {{- $atomPrevious = printf `<atom:link rel="previous" href=%q />` .URL | safeHTML -}} + {{- $atomPrevious = printf `<atom:link rel="previous" href=%q />` (.URL | absURL) | safeHTML -}} {{- end -}} {{- with $.Paginator.Next -}} - {{- $atomNext = printf `<atom:link rel="next" href=%q />` .URL | safeHTML -}} + {{- $atomNext = printf `<atom:link rel="next" href=%q />` (.URL | absURL) | safeHTML -}} {{- end -}} {{- end -}} @@ -69,7 +71,7 @@ <lastBuildDate>{{ $lastBuildDate }}</lastBuildDate> <image> <title>{{ $title }}</title> - <url>{{ .Site.BaseURL }}{{ $image }}</url> + <url>{{ $absURL }}{{ $image }}</url> <link>{{ .Permalink }}</link> </image> @@ -89,7 +91,7 @@ {{- $image = "/data/media/404.png" -}} {{- end -}} - {{- $atomAuthorUri := print .Site.BaseURL $image -}} + {{- $atomAuthorUri := print $absURL $image -}} {{- $atomAuthorName := or .Params.Feed.name $author.name -}} {{- if .Params.Feed.favicon -}} @@ -97,7 +99,7 @@ {{- if not (fileExists (print "public/" $favicon)) -}} {{- $favicon = "/data/media/404.png" -}} {{- end -}} - {{- $atomAuthorUri = print .Site.BaseURL $favicon -}} + {{- $atomAuthorUri = print $absURL $favicon -}} {{- end -}} <item> @@ -106,9 +108,9 @@ <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <guid>{{ .Permalink }}</guid> <description> - {{- partial "function-content.html" . | html -}} + {{ partial "function-content.html" . | html -}} {{- print "<br>" | html -}} - {{- partial "rss-tags.html" . | html -}} + {{- partial "rss-tags.html" . | html }} </description> <atom:author> <atom:name>{{ $atomAuthorName }}</atom:name> |