aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default
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/_default
parent8a77cf95f080b06bf95f51e365d955844f08c075 (diff)
downloadcanory-b8b1cba41c944610f4d51d6368902425d5c32143.tar.gz
canory-b8b1cba41c944610f4d51d6368902425d5c32143.tar.bz2
canory-b8b1cba41c944610f4d51d6368902425d5c32143.zip
themes/default/layouts: Namespacing
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r--themes/default/layouts/_default/_markup/render-image.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html
index 6f702e3..116d280 100644
--- a/themes/default/layouts/_default/_markup/render-image.html
+++ b/themes/default/layouts/_default/_markup/render-image.html
@@ -13,8 +13,8 @@
{{- $author := .Page.Section -}}
{{- $relURL := strings.TrimPrefix .Page.Site.BaseURL .Page.Permalink -}}
{{- $immutable := print ($relURL | humanize | urlize) "-" ($source | sha256 | truncate 8 "") -}}
-{{- $fileCache := print (partial "function-paths.html").media "/" $author "/" $immutable -}}
-{{- $cached := and (fileExists (print "public/" $fileCache ".webp")) (fileExists (print "public/" $fileCache (path.Ext $source))) -}}
+{{- $storage := print (partial "function-paths.html").media "/" $author "/" $immutable -}}
+{{- $cached := and (fileExists (print "public/" $storage ".webp")) (fileExists (print "public/" $storage (path.Ext $source))) -}}
{{- if not $cached -}}
{{- with $remote := cond (default true $.Page.Site.Params.site.offline) false (resources.GetRemote $source) -}}
@@ -38,7 +38,7 @@
{{- end -}}
{{- end -}}
{{- else -}}
- {{- $exists = resources.Get (print "public/" $fileCache (path.Ext $source)) -}}
+ {{- $exists = resources.Get (print "public/" $storage (path.Ext $source)) -}}
{{- $exists = $exists.Content | resources.FromString (print (partial "function-paths.html").media "/" $author "/" (path.Base $exists)) -}}
{{- end -}}
@@ -67,8 +67,8 @@
{{- end -}}
{{- with $exists }}
- {{- if fileExists (print "public/" $fileCache ".webp") -}}
- {{- $srcset = print ("" | absURL) "/" $fileCache ".webp" -}}
+ {{- if fileExists (print "public/" $storage ".webp") -}}
+ {{- $srcset = print ("" | absURL) "/" $storage ".webp" -}}
{{- end -}}
{{- if fileExists (print "public/" $author "/media/" $immutable ".webp") -}}
{{- $srcset = print ("" | absURL) "/" $author "/media/" $immutable ".webp" -}}