From a70cc3244119884b8597b77a8ea6aaf1750583a8 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 19 Apr 2026 00:22:47 -0700 Subject: [PATCH] Enable custom CSS and bring in writing layout from blog. Signed-off-by: Danila Fedorin --- layouts/partials/head.html | 7 +++++++ layouts/writing/baseof.html | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 layouts/writing/baseof.html diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d1d8636..35c2e8b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -50,6 +50,13 @@ {{ end }} {{ end }} + {{ if .Params.custom_css }} + {{ range $customCss := .Params.custom_css }} + {{ $renderedCustomCss := page.Resources.Get $customCss | css.Sass (dict "includePaths" (slice "themes/vanilla/assets/scss")) | resources.Minify }} + + {{ end }} + {{ end }} + {{ if hugo.IsServer }} diff --git a/layouts/writing/baseof.html b/layouts/writing/baseof.html new file mode 100644 index 0000000..4648c7c --- /dev/null +++ b/layouts/writing/baseof.html @@ -0,0 +1,25 @@ +{{- /* Note: changing the baseof template because the title, tags, etc. of a regular post are still valid. */ -}} + + + {{- partial "head.html" . -}} + + {{ with .Params.body_start_partial }} + {{ partial . $ }} + {{ end }} + + + {{ $writingcss := resources.Get "scss/writing.scss" | css.Sass | resources.Minify }} + + {{- partial "header.html" . -}} +

+
+ + {{- if .Draft -}} + {{- partial "warning.html" (i18n "postDraft") -}} + {{- end -}} + + {{- block "main" . }}{{- end }} +
+ {{- block "after" . }}{{- end }} + +