mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2024-12-24 22:15:52 -05:00
🐛 Fix CSS/JS URLs reference to support deployment in a subdirectory
This commit is contained in:
parent
a2eb47bb4b
commit
73bda55c36
@ -69,9 +69,9 @@
|
||||
|
||||
{{- if not site.Params.assets.disableFingerprinting }}
|
||||
{{- $stylesheet := $stylesheet | fingerprint }}
|
||||
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
|
||||
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink | absURL }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
|
||||
{{- else }}
|
||||
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
|
||||
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink | absURL }}" rel="preload stylesheet" as="style">
|
||||
{{- end }}
|
||||
|
||||
{{- /* Search */}}
|
||||
@ -82,10 +82,10 @@
|
||||
{{- $license_js := resources.Get "js/license.js" }}
|
||||
{{- if not site.Params.assets.disableFingerprinting }}
|
||||
{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }}
|
||||
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script>
|
||||
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink | absURL }}" integrity="{{ $search.Data.Integrity }}"></script>
|
||||
{{- else }}
|
||||
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }}
|
||||
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}"></script>
|
||||
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink | absURL }}"></script>
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user