summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-05-16 09:42:07 +0200
committerVolpeon <git@volpeon.ink>2021-05-16 09:42:07 +0200
commit541355eadcfe5c39c6e11e9e435b12f325c60f49 (patch)
tree37105c3d3c06b881cf8c3ab9d37765bb7526d5ad
parentDesign adjustments (diff)
downloadvolpeon.ink-541355eadcfe5c39c6e11e9e435b12f325c60f49.tar.gz
volpeon.ink-541355eadcfe5c39c6e11e9e435b12f325c60f49.tar.bz2
volpeon.ink-541355eadcfe5c39c6e11e9e435b12f325c60f49.zip
Cache busting for stylesheet
-rw-r--r--Makefile3
-rw-r--r--templates/base.html4
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, \
62 -o "$@" "$<" 62 -o "$@" "$<"
63 rm "$(PAGES)" 63 rm "$(PAGES)"
64 64
65out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua | out 65out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua out/style.css | out
66 $(info [MARK] $< -> $@) 66 $(info [MARK] $< -> $@)
67 67
68 mkdir -p $(@D) 68 mkdir -p $(@D)
@@ -74,6 +74,7 @@ out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml fil
74 --lua-filter scripts/metadata_filter.lua \ 74 --lua-filter scripts/metadata_filter.lua \
75 $(GLOBAL_METADATA) \ 75 $(GLOBAL_METADATA) \
76 --metadata-file "$(filter .cache/meta/%.json,$^)" \ 76 --metadata-file "$(filter .cache/meta/%.json,$^)" \
77 --metadata style_hash="$(shell sha256sum out/style.css | cut -d ' ' -f 1)" \
77 $(PANDOC_FILTERS) \ 78 $(PANDOC_FILTERS) \
78 -o "$@" "$<" 79 -o "$@" "$<"
79 80
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 @@
21 21
22 <title>$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$</title> 22 <title>$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$</title>
23 23
24 <link rel="preload" href="/style.css" as="style" /> 24 <link rel="preload" href="/style.css?$style_hash$" as="style" />
25 <link rel="preload" href="/symbols.svg" as="image" type="image/svg+xml" /> 25 <link rel="preload" href="/symbols.svg" as="image" type="image/svg+xml" />
26 <link rel="preload" href="/IBMPlexSans-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> 26 <link rel="preload" href="/IBMPlexSans-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
27 <link rel="preload" href="/IBMPlexSans-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> 27 <link rel="preload" href="/IBMPlexSans-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
@@ -29,7 +29,7 @@
29 <link rel="preload" href="/iosevka-term-ss09-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> 29 <link rel="preload" href="/iosevka-term-ss09-regular.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
30 <link rel="preload" href="/iosevka-term-ss09-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> 30 <link rel="preload" href="/iosevka-term-ss09-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
31 31
32 <link rel="stylesheet" href="/style.css" /> 32 <link rel="stylesheet" href="/style.css?$style_hash$" />
33</head> 33</head>
34 34
35<body> 35<body>