fix external static style.css path (part 2)

This commit is contained in:
panr 2022-12-09 15:54:14 +01:00
parent 613325cba0
commit 1d7e65f42e

View File

@ -13,14 +13,14 @@
{{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }} {{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }}
{{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }} {{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }}
{{ $localColorStyles := $localCss | resources.ToCSS }} {{ $localColorStyles := $localCss | resources.ToCSS }}
<link rel="stylesheet" href="{{ $localColorStyles.RelPermalink }}"> <link rel="stylesheet" href="{{ $localColorStyles.Permalink }}">
{{ else }} {{ else }}
<!-- Theme Variables --> <!-- Theme Variables -->
{{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }} {{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }}
{{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }} {{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }}
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} {{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }}
{{ $styles := $css | resources.ToCSS $options }} {{ $styles := $css | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}"> <link rel="stylesheet" href="{{ $styles.Permalink }}">
{{ end }} {{ end }}
<!-- Custom CSS to override theme properties (/static/style.css) --> <!-- Custom CSS to override theme properties (/static/style.css) -->