diff options
author | tdro <tdro@noreply.example.com> | 2022-06-25 22:49:32 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-06-25 22:49:32 -0400 |
commit | fbeb2a9c1fecf8b0ac2347645dfcae2bb64706c4 (patch) | |
tree | c29bc39e2e9aa3d13daca0f642f7cd59db0ead08 /themes/default/layouts/partials/video-container.html | |
parent | 070e9e148c6b637cbd2ba622f867d3e25ace7365 (diff) | |
download | canory-fbeb2a9c1fecf8b0ac2347645dfcae2bb64706c4.tar.gz canory-fbeb2a9c1fecf8b0ac2347645dfcae2bb64706c4.tar.bz2 canory-fbeb2a9c1fecf8b0ac2347645dfcae2bb64706c4.zip |
themes/default/layouts/partials/video-container: Forge a reliable slug variable
To prevent subdirectory path (if in use) from leaking into immutable link.
Diffstat (limited to 'themes/default/layouts/partials/video-container.html')
-rw-r--r-- | themes/default/layouts/partials/video-container.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/video-container.html b/themes/default/layouts/partials/video-container.html index 79df910..73bbfad 100644 --- a/themes/default/layouts/partials/video-container.html +++ b/themes/default/layouts/partials/video-container.html @@ -2,7 +2,7 @@ {{- $caption := .Caption -}} {{- $public := print "public/" .Source -}} {{- $timestamp := print "#t=" .Start "," .End -}} -{{- $immutable := print (.RelURL | humanize | urlize) "-" (.Source | sha256 | truncate 8 "") -}} +{{- $immutable := print (.Slug | humanize | urlize) "-" (.Source | sha256 | truncate 8 "") -}} {{- $extension := path.Ext .Source -}} {{- $fileCache := print $.Author "/media/" $immutable $extension -}} |