hugo/docs/layouts/_partials/helpers/linkjs.html
Bjørn Erik Pedersen 61a286595e
Some checks are pending
Test / test (1.23.x, ubuntu-latest) (push) Waiting to run
Test / test (1.23.x, windows-latest) (push) Waiting to run
Test / test (1.24.x, ubuntu-latest) (push) Waiting to run
Test / test (1.24.x, windows-latest) (push) Waiting to run
Merge commit 'b3d87dd0fd'
2025-04-24 10:23:16 +02:00

15 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 }}