1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 06:58:28 -04:00
Jake Jarvis 20c32eaeb3
*much* smarter way of setting page-specific CSS
via front matter instead of flaky shortcode/page scratch
2020-04-09 13:59:49 -04:00

10 lines
379 B
HTML

{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "style.css") | resources.PostCSS (dict "config" "postcss.config.js") }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{/* Page-specific styles set via front matter */}}
{{ with .Params.css }}
<style>
{{ . | safeCSS }}
</style>
{{ end }}