blob: af7c709bfae2c2bf6b92e4f51855502f665547f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{{- /* Styles */}}
{{- $theme := resources.Get "sass/style.scss" | resources.ToCSS }}
{{- /* include hljs' css if hljs is on */}}
{{- $isHLJSdisabled := (site.Params.assets.disable_highlight_js | default false) }}
{{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/hljs-default.min.css")) }}
{{- /* order is important */}}
{{- $core := (slice $theme $hljs) | resources.Concat "assets/css/core.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 $core $extended) | resources.Concat "assets/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.RelPermalink $stylesheet.Data.Integrity | safeHTML }}
{{- else }}
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{- end }}
|