mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit 'b3d87dd0fd746f07f9afa6e6a2969aea41da6a38'
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