Skip to content

Commit

Permalink
upup
Browse files Browse the repository at this point in the history
  • Loading branch information
l10178 committed Feb 24, 2024
1 parent 52f1015 commit cb3ec1a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layouts/partials/head/libsass.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ $css := "" }}
{{ if eq (hugo.Environment) "development" -}}
{{ $options := (dict "targetPath" "main.css" "transpiler" "libsass" "enableSourceMap" true "includePaths" (slice "node_modules")) -}}
{{ $css = resources.Get . | toCSS $options | resources.Fingerprint "sha512" -}}
{{ else -}}
{{ $options := (dict "targetPath" "main.css" "transpiler" "libsass" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}}
{{ $css = resources.Get . | toCSS $options | postCSS (dict "config" "config/postcss.config.js") | resources.Fingerprint "sha512" -}}
{{ end -}}
<link rel="stylesheet" href="{{ $css.Permalink | relURL }}">

0 comments on commit cb3ec1a

Please sign in to comment.