Skip to content

Commit 1ea78b6

Browse files
committed
website: cache bust font-files/InterVariable.ttf used by glyph inspector
1 parent abfa193 commit 1ea78b6

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Diff for: docs/res/glyph-inspector.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
---
2+
layout: none
3+
---
4+
{% include defs.html %}{%
5+
for file in site.static_files %}{%
6+
assign _path = file.path | remove_first: "/inter" %}{%
7+
if _path == "/font-files/InterVariable.ttf" %}{%
8+
assign ttf_timestamp = file.modified_time | date: "%Y%m%d%H%M%S" %}{%
9+
endif %}{%
10+
endfor %}
11+
112
import fontkit from "./fontkit-2.0.2.js"
213

314
const { min, max, ceil, floor } = Math
@@ -962,5 +973,5 @@ class GlyphInspector {
962973
}
963974

964975
let inspector = new GlyphInspector()
965-
await inspector.loadFont('font-files/InterVariable.ttf')
976+
await inspector.loadFont('font-files/InterVariable.ttf?v={{ttf_timestamp}}')
966977
// await inspector.loadFont('font-files/InterDisplay-Regular.otf')

0 commit comments

Comments
 (0)