Adding codeblocks.js.
This commit is contained in:
parent
0effd8ee1a
commit
edd02f464e
1 changed files with 37 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
{{ $noop := .WordCount -}}
|
||||
|
||||
{{ $opts := dict "minify" true -}}
|
||||
{{ if eq hugo.Environment "development" -}}
|
||||
{{ $opts = merge $opts (dict "minify" false) -}}
|
||||
|
|
@ -43,6 +45,11 @@
|
|||
<script defer src="{{ $tables.RelPermalink }}"></script>
|
||||
{{ end -}}
|
||||
|
||||
{{ if or ($.Param "codeblocks") (.Page.Store.Get "codeblocks") -}}
|
||||
{{ $codeblocks := resources.Get "js/codeblocks.js" | js.Build $opts | fingerprint -}}
|
||||
<script defer src="{{ $codeblocks.RelPermalink }}"></script>
|
||||
{{ end -}}
|
||||
|
||||
{{ if .HasShortcode "contact" -}}
|
||||
{{ $contact := resources.Get "js/contact.js" | js.Build $opts | fingerprint -}}
|
||||
<script defer src="{{ $contact.RelPermalink }}"></script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue