mirror of
https://git.adityakumar.xyz/adityakumar.xyz.git
synced 2024-12-22 17:02:54 +00:00
18 lines
922 B
HTML
18 lines
922 B
HTML
{{ $bundleRaw := resources.Get "sass/style.sass" | resources.ExecuteAsTemplate "css/main.tmp.css" . }}
|
|
|
|
{{ if .Site.IsServer }}
|
|
{{ $cssOpts := (dict "targetPath" "css/main.css" "enableSourceMap" true ) }}
|
|
{{ $bundle := $bundleRaw | toCSS $cssOpts }}
|
|
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" media="screen">
|
|
{{ else }}
|
|
{{ $cssOpts := (dict "targetPath" "css/main.css" ) }}
|
|
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
|
|
{{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
|
|
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" crossorigin="anonymous" media="screen">
|
|
{{ end }}
|
|
|
|
<!-- Custom css -->
|
|
{{ range .Site.Params.customCSS -}}
|
|
{{ $style := resources.Get . }}
|
|
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen">
|
|
{{- end }}
|