mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-14 17:09:45 +00:00
3a6144e557
* Fix font path
* Fix favicon path
* Revert "Serve hugo pipes assets with .RelPermalink (#107)"
This reverts commit 88aa5812f5
.
* Use relLangURL
* Rebuild docs
18 lines
869 B
HTML
18 lines
869 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.Permalink }}" 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.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" media="screen">
|
|
{{ end }}
|
|
|
|
<!-- Custom css -->
|
|
{{ range .Site.Params.customCSS -}}
|
|
{{ $style := resources.Get . }}
|
|
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" media="screen">
|
|
{{- end }}
|