Skip to content

feat: add offline.mode config to disable the service worker - #49

Merged
QQSHI13 merged 1 commit into
mainfrom
feat/offline-mode
Aug 20, 2026
Merged

feat: add offline.mode config to disable the service worker#49
QQSHI13 merged 1 commit into
mainfrom
feat/offline-mode

Conversation

@QQSHI13

@QQSHI13 QQSHI13 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Adds an offline.mode config option to switch the service worker off entirely.

  • Default cache-first (unchanged): SW registers, precaches every page/asset, serves from cache first.
  • none: no sw.js, no cache-manifest.json, no manifest.json, no SW registration or manifest link in pages.

Also regenerates the committed templates with the pinned html-minifier-terser 7.2.0 (the committed templates were stale from an older toolchain; 7.2.0 no longer minifies inline scripts containing Jinja fragments).

Tests: config default/validation unit tests + e2e none-mode build check.

offline.mode defaults to cache-first (unchanged). Setting it to 'none'
eliminates the service worker and all its caching: no sw.js at the site
root or in assets, no cache-manifest.json, no manifest.json, and pages
carry no SW registration or manifest link.

Also regenerates docsforge/templates/base.html with the current pinned
html-minifier-terser 7.2.0, which no longer minifies inline scripts that
contain Jinja fragments (the committed templates were stale from an older
toolchain version).
@QQSHI13
QQSHI13 merged commit 6e8a75c into main Aug 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant