mirror of https://github.com/gohugoio/hugo
16 lines
416 B
HTML
16 lines
416 B
HTML
{{ $r := .r }}
|
|
{{ $attr := .attributes | default dict }}
|
|
{{ if hugo.IsDevelopment }}
|
|
<script
|
|
src="{{ $r.RelPermalink }}"
|
|
{{ template `render-attributes` $attr }}></script>
|
|
{{ else }}
|
|
{{ with $r | fingerprint }}
|
|
<script
|
|
src="{{ .RelPermalink }}"
|
|
integrity="{{ .Data.Integrity }}"
|
|
crossorigin="anonymous"
|
|
{{ template `render-attributes` $attr }}></script>
|
|
{{ end }}
|
|
{{ end }}
|