aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-25 22:15:59 -0400
committertdro <tdro@noreply.example.com>2022-06-25 22:15:59 -0400
commit070e9e148c6b637cbd2ba622f867d3e25ace7365 (patch)
tree38a8c8d6a099bbbbe5b4782a0bbe3e610843711a
parentd3b2f8b628342413e6488cc0f90cfa7b0d29a85f (diff)
downloadcanory-070e9e148c6b637cbd2ba622f867d3e25ace7365.tar.gz
canory-070e9e148c6b637cbd2ba622f867d3e25ace7365.tar.bz2
canory-070e9e148c6b637cbd2ba622f867d3e25ace7365.zip
themes/default/layouts/partials/video-container: Don't duplicate content
Overwrite to same asset path to prevent duplicates. Will need to do this for images.
-rw-r--r--themes/default/layouts/partials/video-container.html3
1 files changed, 1 insertions, 2 deletions
diff --git a/themes/default/layouts/partials/video-container.html b/themes/default/layouts/partials/video-container.html
index f523c89..79df910 100644
--- a/themes/default/layouts/partials/video-container.html
+++ b/themes/default/layouts/partials/video-container.html
@@ -5,7 +5,6 @@
{{- $immutable := print (.RelURL | humanize | urlize) "-" (.Source | sha256 | truncate 8 "") -}}
{{- $extension := path.Ext .Source -}}
{{- $fileCache := print $.Author "/media/" $immutable $extension -}}
-{{- $mediaCache := print (partial "function-paths-media.html") "/" $.Author "/" $immutable $extension -}}
{{- if not (fileExists (path.Join "public/" $fileCache)) -}}
{{- with $remote := resources.GetRemote .Source -}}
@@ -23,7 +22,7 @@
{{- end -}}
{{- else -}}
{{- $cache = resources.Get (path.Join "public/" $fileCache) -}}
- {{- $cache = $cache | resources.FromString $mediaCache -}}
+ {{- $cache = $cache.Content | resources.FromString $fileCache -}}
{{- $cache = $cache.RelPermalink -}}
{{- end -}}