1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-12-03 03:48:55 -05:00
2021-05-29 09:18:14 -04:00
parent 1b69d01a19
commit f345256921
6 changed files with 19 additions and 16 deletions

View File

@@ -37,3 +37,11 @@
{{- $.Scratch.Set "logoImage" . -}}
{{- end -}}
{{- end -}}
{{/* Page-specific styles set via front matter, piped through PostCSS and inlined */}}
{{- with .Params.css -}}
{{/* NOTE: This file doesn't end up getting published (which is good) */}}
{{- $target := path.Join $.File.Dir "css/inline.scss" -}}
{{- $css := . | resources.FromString $target | resources.ExecuteAsTemplate $target . | resources.ToCSS (dict "targetPath" $target) | resources.PostCSS (dict "config" "postcss.config.js") -}}
{{- $.Scratch.Set "pageCss" $css.Content -}}
{{- end -}}