Debian Codegraph @

docs/layouts/_partials/helpers/linkjs.html

raw
1 {{ $r := .r }}
2 {{ $attr := .attributes | default dict }}
3 {{ if hugo.IsDevelopment }}
4 <script
5 src="{{ $r.RelPermalink }}"
6 {{ template `render-attributes` $attr }}>
7 </script>
8 {{ else }}
9 {{ with $r | fingerprint }}
10 <script
11 src="{{ .RelPermalink }}"
12 integrity="{{ .Data.Integrity }}"
13 crossorigin="anonymous"
14 {{ template `render-attributes` $attr }}>
15 </script>
16 {{ end }}
17 {{ end }}