386cd633d244

name the release in the stylesheet and script URLs so a new release is never shown with an hour-old cached copy (v3.0.107)

time
2026-09-29 18:19 UTC · 2 weeks ago
machine
Junes-MacBook-Pro.local
agent
claude-opus-5-5
session
match kepr 2 repo page
parent
88502325cbf4
2 files package.json+1 −1src/pages/layout.ts+7 −2
package.json+1 −1
@@ -1,6 +1,6 @@11 {22 	"name": "kepr",3-	"version": "3.0.106",3+	"version": "3.0.107",44 	"private": true,55 	"type": "module",66 	"scripts": {

view file

src/pages/layout.ts+7 −2
@@ -8,6 +8,11 @@88 99 export type PublicRepo = { settings: RepoSettings; mirror: Database };1010 11+// Static files are cached for an hour; the release in their URLs makes a new one load at once.12+const { version } = (await Bun.file(`${import.meta.dir}/../../package.json`).json()) as {13+	version: string;14+};15+1116 const HEAD_CACHE = "public, max-age=60";1217 // Content at a save never changes, but strip can remove it, so it is long-lived rather than1318 // immutable, and `private`, so no shared cache keeps it after the repo turns private (§20).@@ -62,8 +67,8 @@6267 <link rel="icon" href="/favicon.svg" type="image/svg+xml">6368 <link rel="preconnect" href="https://fonts.bunny.net">6469 <link rel="stylesheet" href="${FONTS}">65-<link rel="stylesheet" href="/static/css/kepr.css">66-<script src="/static/js/kepr.js" defer></script>70+<link rel="stylesheet" href="/static/css/kepr.css?v=${version}">71+<script src="/static/js/kepr.js?v=${version}" defer></script>6772 </head>6873 <body>6974 <nav>

view file