diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-03 01:17:34 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-03 01:17:34 +0200 |
| commit | 793ab34a77b4966de6fe10b9106b90f14c02f242 (patch) | |
| tree | 4eae2d06befb8e11deb96ddaac9808424197f652 /layouts/partials/styles.html | |
| parent | 054635bd3d4c85ba5bf1645da584aa6c89973278 (diff) | |
| download | gohugo-theme-ed-793ab34a77b4966de6fe10b9106b90f14c02f242.tar.gz | |
Use relative uri for stylesheets and scripts
Diffstat (limited to 'layouts/partials/styles.html')
| -rw-r--r-- | layouts/partials/styles.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html index 470c476..8283883 100644 --- a/layouts/partials/styles.html +++ b/layouts/partials/styles.html @@ -4,15 +4,15 @@ {{- /* order is important */}} {{- /* to ass more styles use the following format: slice $theme $style1 $style2 $style3 ... */}} {{- $core := (slice $theme) | resources.Concat "assets/css/core.css" }} -{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} +{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "css/extended.css" }} {{- /* bundle all required css */}} {{- /* Add extended css after theme style */ -}} -{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} +{{- $stylesheet := (slice $core $extended) | resources.Concat "css/stylesheet.css" | minify }} {{- if not site.Params.assets.disable_fingerprinting -}} {{- $stylesheet := $stylesheet | fingerprint }} - {{ printf `<link crossorigin="anonymous" href="%s" integrity="%s" rel="preload stylesheet" as="style">` $stylesheet.Permalink $stylesheet.Data.Integrity | safeHTML }} + {{ printf `<link crossorigin="anonymous" href="%s" integrity="%s" rel="preload stylesheet" as="style">` $stylesheet.RelPermalink $stylesheet.Data.Integrity | safeHTML }} {{- else }} - <link crossorigin="anonymous" href="{{ $stylesheet.Permalink }}" rel="preload stylesheet" as="style"> + <link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style"> {{- end }} |
