mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01: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>
|
</a>
|
||||||
{{- partial "extend_footer.html" . -}}
|
{{- partial "extend_footer.html" . -}}
|
||||||
{{ if in site.Params.mainSections .Type }}
|
{{ 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 }}
|
{{- $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 }}"
|
<script defer src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||||
onload="hljs.initHighlightingOnLoad();"></script>
|
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 }}
|
{{- end }}
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
|
@ -21,9 +21,14 @@
|
|||||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
||||||
{{- end}}
|
{{- end}}
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
|
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||||
{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
|
{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
|
||||||
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
||||||
as="style">
|
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 -->
|
<!-- Favicons -->
|
||||||
<link rel="icon" href="{{- .Site.Params.assets.favicon | default "favicon.ico" | absURL -}}">
|
<link rel="icon" href="{{- .Site.Params.assets.favicon | default "favicon.ico" | absURL -}}">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="
|
<link rel="icon" type="image/png" sizes="16x16" href="
|
||||||
|
Loading…
Reference in New Issue
Block a user