From 541355eadcfe5c39c6e11e9e435b12f325c60f49 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 16 May 2021 09:42:07 +0200 Subject: Cache busting for stylesheet --- Makefile | 3 ++- templates/base.html | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2be2e21..aa4ecf3 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ -o "$@" "$<" rm "$(PAGES)" -out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua | out +out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua out/style.css | out $(info [MARK] $< -> $@) mkdir -p $(@D) @@ -74,6 +74,7 @@ out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml fil --lua-filter scripts/metadata_filter.lua \ $(GLOBAL_METADATA) \ --metadata-file "$(filter .cache/meta/%.json,$^)" \ + --metadata style_hash="$(shell sha256sum out/style.css | cut -d ' ' -f 1)" \ $(PANDOC_FILTERS) \ -o "$@" "$<" diff --git a/templates/base.html b/templates/base.html index d9aaa8e..466f7c8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -21,7 +21,7 @@ $if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$ - + @@ -29,7 +29,7 @@ - + -- cgit v1.2.3-54-g00ecf