aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-05 21:07:34 -0400
committertdro <tdro@noreply.example.com>2022-06-05 21:07:34 -0400
commitc18aa36eff024781337461f894b1f147b652537e (patch)
tree2dce09f6d907faff5b97d8c28cce3e0e6472da98
parent7bb81f12d3d9032f182acee84f86c893340e0ead (diff)
downloadcanory-c18aa36eff024781337461f894b1f147b652537e.tar.gz
canory-c18aa36eff024781337461f894b1f147b652537e.tar.bz2
canory-c18aa36eff024781337461f894b1f147b652537e.zip
themes/default/layouts/partials/feeds-generate: Cache remote images to static folder
Let's slowly not pollute the public area.
-rw-r--r--themes/default/layouts/partials/feeds-generate.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/default/layouts/partials/feeds-generate.html b/themes/default/layouts/partials/feeds-generate.html
index b2bb893..3310a9a 100644
--- a/themes/default/layouts/partials/feeds-generate.html
+++ b/themes/default/layouts/partials/feeds-generate.html
@@ -141,8 +141,9 @@
{{- $fallbackHeight := .Height -}}
{{ end }}
{{- else -}}
- {{- $imageTitle = $imageCanonicalURL -}}
- {{- $imageSource = $image.RelPermalink -}}
+ {{- $imageContent := $image.Content | resources.FromString (print "/data/static/images/" ($image | urlize)) -}}
+ {{- $imageSource = $imageContent.RelPermalink -}}
+ {{- $imageTitle = $imageCanonicalURL -}}
{{ end }}
{{ end }}
@@ -223,8 +224,7 @@
{{ .FeedDate }}
</time>
{{- with .FeedDescriptionShort -}}
- {{ "--" | markdownify }}
- {{ . }}
+ {{ "--" | markdownify }} {{ . }}
{{- end }}
</p>