diff options
| author | tdro <tdro@noreply.example.com> | 2024-06-13 00:00:00 +0000 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2024-06-13 00:00:00 +0000 |
| commit | d289dc4c2e10b0d4debcff3780c6e893dc236e5f (patch) | |
| tree | ea43960d191cc2e4251b3f12ef71586e413c21f1 | |
| parent | 912c7fee89e38ae2fa5b2c539215948162c4d9e8 (diff) | |
| download | canory-d289dc4c2e10b0d4debcff3780c6e893dc236e5f.tar.gz canory-d289dc4c2e10b0d4debcff3780c6e893dc236e5f.tar.bz2 canory-d289dc4c2e10b0d4debcff3780c6e893dc236e5f.zip | |
themes/default/layouts/partials/function-generate-feeds: Handle guid specified feeds
| -rw-r--r-- | themes/default/layouts/partials/function-generate-feeds.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/function-generate-feeds.html b/themes/default/layouts/partials/function-generate-feeds.html index 57789b5..edd6e23 100644 --- a/themes/default/layouts/partials/function-generate-feeds.html +++ b/themes/default/layouts/partials/function-generate-feeds.html @@ -57,7 +57,7 @@ {{- $description = .description -}} {{- $content = .description -}} {{- $title = .title -}} - {{- $link = .link -}} + {{- $link = or .link (index .guid "#text") -}} {{- $date = .pubDate -}} {{- with .enclosure -}} {{- $enclosure = index . "-url" -}} @@ -154,6 +154,9 @@ {{- /* Try to complete link relative links. */ -}} {{- if not ($link | urls.Parse).Host -}} {{- $link = print "http://" $sourceDomain $link -}} + {{- if not ($link | urls.Parse).Host -}} + {{- $link = print "http://" $sourceDomain -}} + {{- end -}} {{- end -}} {{- |
