1
0
Fork 0
hugo/docs/layouts/partials/helpers/linkjs.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 }}