File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 6
6
{{ end }}
7
7
{{/* copy-and-paste helper for codenew shortcode */}}
8
8
{{- if or (.HasShortcode "code_sample") (.HasShortcode "code") (.HasShortcode "codenew") -}}
9
- < script async src ="{{ "js /sweetalert-2.1.2.min.js" | relURL }}"> </ script >
9
+ {{- if hugo.IsProduction -}}
10
+ {{- $sweetAlert := resources.Get "js/sweetalert-2.1.2.min.js" | minify | fingerprint -}}
11
+ < script async src ="{{ $sweetAlert.RelPermalink }} " integrity ="{{ $sweetAlert.Data.Integrity }} " crossorigin ="anonymous "> </ script >
12
+ {{- else -}}
13
+ {{- $sweetAlert := resources.Get "js/sweetalert-2.1.2.min.js" -}}
14
+ < script async src ="{{ $sweetAlert.RelPermalink }} "> </ script >
15
+ {{- end -}}
10
16
< script type ="text/javascript ">
11
17
function copyCode ( elem ) {
12
18
if ( document . getElementById ( elem ) ) {
You can’t perform that action at this time.
0 commit comments