mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-13 00:39:45 +00:00
19 lines
933 B
HTML
19 lines
933 B
HTML
<!-- Fonts and icon CSS -->
|
|
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | relURL }}">
|
|
|
|
{{ $file := "sass/style.sass" }}
|
|
{{ if .Site.IsServer }}
|
|
{{ $cssOpts := (dict "targetPath" "styles/main.css" "enableSourceMap" true ) }}
|
|
{{ $styles := resources.Get $file | resources.ExecuteAsTemplate "style/main.tmp.css" . | toCSS $cssOpts }}
|
|
<link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
|
|
{{ else }}
|
|
{{ $cssOpts := (dict "targetPath" "styles/main.css" ) }}
|
|
{{ $postCSSOpts := (dict "use" "autoprefixer" ) }}
|
|
{{ $styles := resources.Get $file | resources.ExecuteAsTemplate "style/main.tmp.css" . | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }}
|
|
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
|
|
{{ end }}
|
|
|
|
<!-- Custom css -->
|
|
{{ range .Site.Params.customCSS -}}
|
|
<link rel="stylesheet" href="{{ . | relURL }}">
|
|
{{- end }}
|