1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 17:05:32 -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

@@ -216,6 +216,11 @@
div.highlight span.ge { font-style: italic; }
div.highlight span.gs { font-weight: bold; }
div.highlight span.lnt { color: #999999; }
{{/* Page-specific styles set via page-css shortcode */}}
{{- with .Page.Scratch.Get "css" }}
{{- . | safeCSS -}}
{{ end -}}
</style>
{{ partialCached "head/favicons" (dict "pngSizes" "192 48 32 16" "icoSizes" "16 32 48") }}