From 1ea78b645ff6ccf6bf4a8d1a36667f0d4c2c0fcb Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Fri, 15 Nov 2024 17:00:11 -0800 Subject: [PATCH] website: cache bust font-files/InterVariable.ttf used by glyph inspector --- docs/res/glyph-inspector.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/res/glyph-inspector.js b/docs/res/glyph-inspector.js index 24f16540f..4d2895c7f 100644 --- a/docs/res/glyph-inspector.js +++ b/docs/res/glyph-inspector.js @@ -1,3 +1,14 @@ +--- +layout: none +--- +{% include defs.html %}{% +for file in site.static_files %}{% + assign _path = file.path | remove_first: "/inter" %}{% + if _path == "/font-files/InterVariable.ttf" %}{% + assign ttf_timestamp = file.modified_time | date: "%Y%m%d%H%M%S" %}{% + endif %}{% +endfor %} + import fontkit from "./fontkit-2.0.2.js" const { min, max, ceil, floor } = Math @@ -962,5 +973,5 @@ class GlyphInspector { } let inspector = new GlyphInspector() -await inspector.loadFont('font-files/InterVariable.ttf') +await inspector.loadFont('font-files/InterVariable.ttf?v={{ttf_timestamp}}') // await inspector.loadFont('font-files/InterDisplay-Regular.otf')