mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
head, footer: add option to disable fingerprinting #89
in site config => params: assets: disableFingerprinting: true
This commit is contained in:
parent
7a0e742def
commit
a9ff9533a0
@ -17,9 +17,14 @@
|
||||
</a>
|
||||
{{- partial "extend_footer.html" . -}}
|
||||
{{ if in site.Params.mainSections .Type }}
|
||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
|
||||
<script defer src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||
onload="hljs.initHighlightingOnLoad();"></script>
|
||||
{{- else}}
|
||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }}
|
||||
<script defer src="{{ $highlight.Permalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
<script>
|
||||
window.onload = function () {
|
||||
|
@ -21,9 +21,14 @@
|
||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
||||
{{- end}}
|
||||
<!-- Styles -->
|
||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||
{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
|
||||
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
||||
as="style">
|
||||
{{- else}}
|
||||
{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}}
|
||||
<link href="{{ $stylesheet.Permalink }}" rel="preload stylesheet" as="style">
|
||||
{{- end}}
|
||||
<!-- Favicons -->
|
||||
<link rel="icon" href="{{- .Site.Params.assets.favicon | default "favicon.ico" | absURL -}}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="
|
||||
|
Loading…
Reference in New Issue
Block a user