use partial for stylesheets

This commit is contained in:
Ben Goldsworthy 2025-06-04 17:47:35 +02:00
parent 54a41716c6
commit 8ec94d7296
No known key found for this signature in database
2 changed files with 36 additions and 0 deletions

View file

@ -35,6 +35,11 @@
title="{{ $.Site.Title | safeHTML }}"
/>
{{- end -}}
<!-- Stylesheets -->
{{- partialCached "head/stylesheets.html" . -}}
<!-- Optional Includes -->
{{- if .Param "math" -}}
{{- partialCached "head/math.html" . -}}
{{- end -}}

View file

@ -0,0 +1,31 @@
{{- /*
References site stylesheets.
*/
-}}
<link
href="/css/sanitize.css"
rel="stylesheet"
/>
{{- $mainStylesheet := resources.Get "css/main.scss" }}
{{- $mainStylesheet := $mainStylesheet | css.Sass | resources.Fingerprint }}
<link
rel="stylesheet"
type="text/css"
href="{{ $mainStylesheet.Permalink }}"
integrity="{{ $mainStylesheet.Data.Integrity | html }}"
/>
{{- $printStylesheet := resources.Get "css/print.scss" }}
{{- $printStylesheet := $printStylesheet | css.Sass | resources.Fingerprint }}
<link
rel="stylesheet"
media="print"
href="{{ $printStylesheet.Permalink }}"
integrity="{{ $printStylesheet.Data.Integrity | html }}"
/>
{{- $feedsStylesheet := resources.Get "css/feeds.scss" }}
{{- $feedsStylesheet := $feedsStylesheet | css.Sass }}
<link
rel="stylesheet"
href="{{ $feedsStylesheet.Permalink }}"
/>