diff options
Diffstat (limited to 'build.js')
| -rw-r--r-- | build.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -90,6 +90,8 @@ self.addEventListener('fetch', (e) => { // copy, the player stalled and failed), and video segments would fill the // cache with what's already been watched. if (u.pathname.startsWith('/live/') || u.pathname.startsWith('/vmedia/hls')) return; + // The developer docs are their own page, not the app: never the offline shell. + if (u.pathname === '/docs' || u.pathname.startsWith('/docs/')) return; if (req.mode === 'navigate') { // A note page comes back with its thread rendered into it (the server's @@ -535,6 +537,8 @@ if (import.meta.main) { // ...and the default profile covers, full size and the wizard's preview copies for (const d of ['punks', 'punks-sm', 'covers', 'covers-sm']) for (const f of readdirSync('static/' + d)) await Bun.write(`dist/${d}/${f}`, Bun.file(`static/${d}/${f}`)); + // the developer docs, a plain page at /docs/ + for (const f of readdirSync('static/docs')) await Bun.write(`dist/docs/${f}`, Bun.file(`static/docs/${f}`)); const kb = (Buffer.byteLength(html) / 1024).toFixed(0); const jkb = (Buffer.byteLength(rawJs) / 1024).toFixed(0); |
