From 7d39832b2a546bce3cc07f849ec9c0f2bdca9849 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sat, 17 Oct 2026 21:57:09 +0200 Subject: [PATCH] Fingerprint custom CSS so CDN caches pick up changes --- {static => assets}/css/custom.css | 0 {static => assets}/css/research.css | 0 layouts/partials/head.html | 43 +++++++++++++++++++++++++++ layouts/partials/research/styles.html | 2 +- 4 files changed, 44 insertions(+), 1 deletion(-) rename {static => assets}/css/custom.css (100%) rename {static => assets}/css/research.css (100%) create mode 100644 layouts/partials/head.html diff --git a/static/css/custom.css b/assets/css/custom.css similarity index 100% rename from static/css/custom.css rename to assets/css/custom.css diff --git a/static/css/research.css b/assets/css/research.css similarity index 100% rename from static/css/research.css rename to assets/css/research.css diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..e10755b --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + +{{- if .Description -}} + +{{- else if .IsPage -}} + +{{- else if .Site.Params.description -}} + +{{- end -}} + + + +{{- with .OutputFormats.Get "RSS" }} + + +{{- end -}} + + + + + + +{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }} + + + +{{ range .Site.Params.customCSS -}} +{{ with resources.Get (printf "css/%s" .) | fingerprint -}} + +{{ end }} +{{ end }} diff --git a/layouts/partials/research/styles.html b/layouts/partials/research/styles.html index 6919d61..86d58e7 100644 --- a/layouts/partials/research/styles.html +++ b/layouts/partials/research/styles.html @@ -1 +1 @@ - +{{ with resources.Get "css/research.css" | fingerprint }}{{ end }}