1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-22 16:44:26 -04:00

*much* smarter way of setting page-specific CSS

via front matter instead of flaky shortcode/page scratch
This commit is contained in:
2020-04-09 13:59:49 -04:00
parent 51dd770094
commit 20c32eaeb3
6 changed files with 28 additions and 35 deletions

View File

@@ -1,2 +1,9 @@
{{ $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 }}