mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
fix wrong asset links on multihost config (#126)
CORS issue for multidomain setup (#168)
This commit is contained in:
parent
946cc1ffe3
commit
3b5c7faaec
@ -21,11 +21,11 @@
|
|||||||
{{- if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`) (not $isHLJSdisabled)) }}
|
{{- if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`) (not $isHLJSdisabled)) }}
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- 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.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||||
onload="hljs.initHighlightingOnLoad();"></script>
|
onload="hljs.initHighlightingOnLoad();"></script>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }}
|
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }}
|
||||||
<script defer src="{{ $highlight.Permalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
<script defer src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<script>
|
<script>
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
|
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||||
{{- $stylesheet := $stylesheet | fingerprint -}}
|
{{- $stylesheet := $stylesheet | fingerprint -}}
|
||||||
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
<link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"
|
||||||
as="style">
|
as="style">
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<link href="{{ $stylesheet.Permalink }}" rel="preload stylesheet" as="style">
|
<link href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
|
||||||
{{- end}}
|
{{- end}}
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
{{- if (eq .Layout `search`) -}}
|
{{- if (eq .Layout `search`) -}}
|
||||||
@ -41,10 +41,10 @@
|
|||||||
{{- $fusejs := resources.Get "js/fuse.js" }}
|
{{- $fusejs := resources.Get "js/fuse.js" }}
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||||
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
||||||
<script defer src="{{ $search.Permalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script>
|
<script defer src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
{{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }}
|
{{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }}
|
||||||
<script defer src="{{ $search.Permalink }}" onload="loadSearch();"></script>
|
<script defer src="{{ $search.RelPermalink }}" onload="loadSearch();"></script>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user