aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-11-02 11:11:08 -0400
committertdro <tdro@noreply.example.com>2023-11-02 11:11:08 -0400
commitb8b1cba41c944610f4d51d6368902425d5c32143 (patch)
treeabcbe8897be8d3d9a0a2a50459900c70ad32b200 /themes/default/layouts/shortcodes
parent8a77cf95f080b06bf95f51e365d955844f08c075 (diff)
downloadcanory-b8b1cba41c944610f4d51d6368902425d5c32143.tar.gz
canory-b8b1cba41c944610f4d51d6368902425d5c32143.tar.bz2
canory-b8b1cba41c944610f4d51d6368902425d5c32143.zip
themes/default/layouts: Namespacing
Diffstat (limited to 'themes/default/layouts/shortcodes')
-rw-r--r--themes/default/layouts/shortcodes/attach.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/themes/default/layouts/shortcodes/attach.html b/themes/default/layouts/shortcodes/attach.html
index dfd472f..238e0cd 100644
--- a/themes/default/layouts/shortcodes/attach.html
+++ b/themes/default/layouts/shortcodes/attach.html
@@ -10,8 +10,8 @@
{{- $immutable := print $url | anchorize -}}
{{- $localFile := path.Join "public/" $url -}}
{{- $type := "application/octet-stream" -}}
-{{- $fileCache := print $author "/media/" $immutable $extension -}}
-{{- $cached := fileExists (path.Join "public/" $fileCache) -}}
+{{- $storage := print $author "/media/" $immutable $extension -}}
+{{- $cached := fileExists (path.Join "public/" $storage) -}}
{{- if not $cached -}}
{{- with $remote := cond (default true $.Page.Site.Params.site.offline) false (resources.GetRemote $url) -}}
@@ -22,7 +22,7 @@
{{- end -}}
{{- else -}}
{{- $type = $remote.MediaType -}}
- {{- $cache = $remote | resources.Copy $fileCache -}}
+ {{- $cache = $remote | resources.Copy $storage -}}
{{- $cache = $cache.Permalink -}}
{{- end -}}
{{- else -}}
@@ -30,7 +30,7 @@
{{- warnf "Attachment remote fetch error: %s" $url -}}
{{- end -}}
{{- else -}}
- {{- with $cache = resources.Get (path.Join "public/" $fileCache) -}}
+ {{- with $cache = resources.Get (path.Join "public/" $storage) -}}
{{- $type = .MediaType -}}
{{- $cache = print ("" | absURL) (strings.TrimLeft "public" $cache) -}}
{{- end -}}