mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'
This commit is contained in:
15
docs/layouts/partials/helpers/linkjs.html
Normal file
15
docs/layouts/partials/helpers/linkjs.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ $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 }}
|
Reference in New Issue
Block a user