From 8ec94d7296cc868472748e4b1a9c56588f31ae08 Mon Sep 17 00:00:00 2001 From: Ben Goldsworthy Date: Wed, 4 Jun 2025 17:47:35 +0200 Subject: [PATCH] use partial for stylesheets --- layouts/_default/baseof.html | 5 +++++ layouts/partials/head/stylesheets.html | 31 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 layouts/partials/head/stylesheets.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c6e1a55..836089e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -35,6 +35,11 @@ title="{{ $.Site.Title | safeHTML }}" /> {{- end -}} + + + {{- partialCached "head/stylesheets.html" . -}} + + {{- if .Param "math" -}} {{- partialCached "head/math.html" . -}} {{- end -}} diff --git a/layouts/partials/head/stylesheets.html b/layouts/partials/head/stylesheets.html new file mode 100644 index 0000000..b6c2cce --- /dev/null +++ b/layouts/partials/head/stylesheets.html @@ -0,0 +1,31 @@ +{{- /* + References site stylesheets. + */ +-}} + + +{{- $mainStylesheet := resources.Get "css/main.scss" }} +{{- $mainStylesheet := $mainStylesheet | css.Sass | resources.Fingerprint }} + +{{- $printStylesheet := resources.Get "css/print.scss" }} +{{- $printStylesheet := $printStylesheet | css.Sass | resources.Fingerprint }} + +{{- $feedsStylesheet := resources.Get "css/feeds.scss" }} +{{- $feedsStylesheet := $feedsStylesheet | css.Sass }} +