diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-13 18:42:54 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-13 18:44:34 +0300 |
commit | 5862a0fb8955d2a759d11a9a7aad8ba8be91f06c (patch) | |
tree | db4bb70359163ee620019c689458705001dca7a0 | |
parent | bf7ff91d1168e2114c3fd74efaf028a573439e58 (diff) |
exampleSite: Fingerprint the JS source
-rw-r--r-- | exampleSite/layouts/index.html | 6 |
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"> |