chore(shortcode): make style shortcode toCSS outputStyle compressed
This commit is contained in:
@@ -6,6 +6,6 @@
|
||||
{{- $style := .Get 0 | printf "#%s{%s}" $id -}}
|
||||
{{- $path := printf "style/%s/%s" (md5 .Page.RelPermalink) $id -}}
|
||||
{{- $res := resources.FromString (printf "%s.scss" $path) $style -}}
|
||||
{{- $res = $res | toCSS (dict "targetPath" (printf "%s.css" $path)) -}}
|
||||
{{- $res = $res | toCSS (dict "targetPath" (printf "%s.css" $path) "outputStyle" "compressed") -}}
|
||||
{{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}}
|
||||
{{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}}
|
||||
|
||||
Reference in New Issue
Block a user