-
-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathstyles.html
More file actions
16 lines (16 loc) · 954 Bytes
/
styles.html
File metadata and controls
16 lines (16 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{ $isDev := ne hugo.Environment "production" }}
{{ $cssOpts := (dict "targetPath" "styles/screen.css" "enableSourceMap" $isDev ) }}
{{ $screenCSS := resources.Get "scss/slate/screen.css.scss" | toCSS $cssOpts }}
{{ $cssOpts = (dict "targetPath" "styles/print.css" "enableSourceMap" $isDev ) }}
{{ $printCSS := resources.Get "scss/slate/print.css.scss" | toCSS $cssOpts }}
{{ if not $isDev }}
{{ $printCSS = $printCSS | postCSS | minify | fingerprint }}
{{ $screenCSS = $screenCSS | postCSS | minify | fingerprint }}
{{ end }}
<link href='{{ $screenCSS.RelPermalink }}' rel="stylesheet" media="screen" {{ if not $isDev }}integrity="{{ $screenCSS.Data.Integrity }}"{{ end }} />
<link href='{{ $printCSS.RelPermalink }}' rel="stylesheet" media="print" {{ if not $isDev }}integrity="{{ $printCSS.Data.Integrity }}"{{ end }} />
{{ with .Site.Params.custom_css }}
{{ range . }}
<link rel="stylesheet" href="/{{ . }}">
{{ end }}
{{ end }}