Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo-mod-bootstrap-scss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-02-13 18:42:54 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-02-13 18:44:34 +0300
commit5862a0fb8955d2a759d11a9a7aad8ba8be91f06c (patch)
treedb4bb70359163ee620019c689458705001dca7a0
parentbf7ff91d1168e2114c3fd74efaf028a573439e58 (diff)
exampleSite: Fingerprint the JS source
-rw-r--r--exampleSite/layouts/index.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/exampleSite/layouts/index.html b/exampleSite/layouts/index.html
index 66d41ac..13477f4 100644
--- a/exampleSite/layouts/index.html
+++ b/exampleSite/layouts/index.html
@@ -30,7 +30,11 @@
{{ $params := dict }}
{{ $sourceMap := cond hugo.IsProduction "" "inline" }}
{{ $opts := dict "sourceMap" $sourceMap "minify" hugo.IsProduction "target" "es2018" "params" $params }}
- {{ $js = $js | js.Build $opts }} <script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
+ {{ $js = $js | js.Build $opts }}
+ {{ if hugo.IsProduction }}
+ {{ $js = $js | fingerprint }}
+ {{ end }}
+ <script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
</head>
<body>
<div class="container mt-5">