Skip to content

Commit 5862a0f

Browse files
committed
exampleSite: Fingerprint the JS source
1 parent bf7ff91 commit 5862a0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎exampleSite/layouts/index.html‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
{{ $params := dict }}
3131
{{ $sourceMap := cond hugo.IsProduction "" "inline" }}
3232
{{ $opts := dict "sourceMap" $sourceMap "minify" hugo.IsProduction "target" "es2018" "params" $params }}
33-
{{ $js = $js | js.Build $opts }} <script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
33+
{{ $js = $js | js.Build $opts }}
34+
{{ if hugo.IsProduction }}
35+
{{ $js = $js | fingerprint }}
36+
{{ end }}
37+
<script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }}integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
3438
</head>
3539
<body>
3640
<div class="container mt-5">

0 commit comments

Comments
 (0)