1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 12:35:31 -04:00

allow page-specific CSS to be set via shortcode and appear in <head>

TODO: Potential bug report w/ live server -- .Page.Scratch is only detected on first run, breaks after any changes trigger rebuild. Might be flaky on real builds too, will investigate.
This commit is contained in:
2020-03-27 14:19:55 -04:00
parent 91ecc58889
commit 146b1047e1
4 changed files with 17 additions and 2 deletions

View File

@@ -19,3 +19,10 @@
{{ else }}
{{ partial "head/schema-person" . }}
{{ end -}}
{{/* Page-specific styles set via page-css shortcode */}}
{{- with .Page.Scratch.Get "css" }}
<style>
{{- . | safeCSS -}}
</style>
{{ end -}}