head: add *.css under assets/css/extended/

to bundle it with stylesheet.css as single resource minified

- added to the end so that default vars are overriden properly
This commit is contained in:
Aditya Telange 2020-12-09 17:17:22 +05:30
parent 5e40132673
commit d74ad93c18
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 6 additions and 1 deletions

View File

View File

@ -21,7 +21,12 @@
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
{{- end}}
<!-- Styles -->
{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}}
{{- $common := (resources.Match "css/*.css") | resources.Concat "assets/css/common.css" }}
{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }}
{{- /* bundle all required css */}}
{{- /* Add extended css after theme style */ -}}
{{- $stylesheet := (slice $common $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}
{{- if not .Site.Params.assets.disableFingerprinting }}
{{- $stylesheet := $stylesheet | fingerprint -}}
<link href="{{ $stylesheet.Permalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet"