mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-20 03:04:04 -05:00
13 lines
429 B
HTML
13 lines
429 B
HTML
|
{{- with resources.Get "js/main.js" }}
|
||
|
{{- if eq hugo.Environment "development" }}
|
||
|
{{- with . | js.Build }}
|
||
|
<script src="{{ .RelPermalink }}"></script>
|
||
|
{{- end }}
|
||
|
{{- else }}
|
||
|
{{- $opts := dict "minify" true }}
|
||
|
{{- with . | js.Build $opts | fingerprint }}
|
||
|
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|