From 070e9e148c6b637cbd2ba622f867d3e25ace7365 Mon Sep 17 00:00:00 2001 From: tdro Date: Sat, 25 Jun 2022 22:15:59 -0400 Subject: 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. --- themes/default/layouts/partials/video-container.html | 3 +-- 1 file changed, 1 insertion(+), 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 -}} -- cgit v1.2.3