From 7f8004e6aff0351134fb7593487d17c55877ea29 Mon Sep 17 00:00:00 2001
From: Served Smart <195884188+servedsmart@users.noreply.github.com>
Date: Wed, 18 Jun 2025 22:56:51 +0200
Subject: [PATCH] :art: Structure: Restructure vendor.html and add missing hugo
fingerprints
This renames $youtubeLiteJS $youtubeLiteLib to match the naming of other files in assets/lib and moves the initialization of $youtubeLiteLib to the bottom, above the script element
This also adds 3 missing fingerprints, one to $packeryLib, one to $twelementsLib and one to $youtubeLiteCSS
---
layouts/partials/vendor.html | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/vendor.html b/layouts/partials/vendor.html
index 98394da2..b84e67ac 100644
--- a/layouts/partials/vendor.html
+++ b/layouts/partials/vendor.html
@@ -62,7 +62,12 @@
{{/* Packery */}}
{{ if .Page.HasShortcode "gallery" }}
{{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }}
-
+ {{ $packeryLib = $packeryLib | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
+
{{ $jsShortcodeGallery := resources.Get "js/shortcodes/gallery.js" }}
{{ $jsShortcodeGallery = $jsShortcodeGallery | resources.Minify | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
@@ -75,19 +80,27 @@
{{/* tw-elements */}}
{{ if or (.Page.HasShortcode "carousel") (.Page.HasShortcode "timeline") }}
{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }}
+ {{ $twelementsLib = $twelementsLib | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
{{ end }}
{{/* youtubeLite */}}
{{ if .Page.HasShortcode "youtubeLite" }}
- {{ $youtubeLiteJS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
{{ $youtubeLiteCSS := resources.Get "lib/lite-youtube-embed/lite-yt-embed.css" }}
+ {{ $youtubeLiteCSS = $youtubeLiteCSS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
-
+ {{ $youtubeLiteLib := resources.Get "lib/lite-youtube-embed/lite-yt-embed.js" }}
+ {{ $youtubeLiteLib = $youtubeLiteLib | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }}
+
{{ end }}