diff --git a/CHANGELOG.md b/CHANGELOG.md
index 209e3b0..f1c3c5e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+## v2.1.0 — 2026-05-05
+
+### Added
+- PWA: persist frontmatter toggle, comments toggle and comment depth across reloads via `localStorage` (keys `pullmd-frontmatter`, `pullmd-comments`, `pullmd-comment-depth`). Closes #20.
+
## v2.0.0 — 2026-XX-XX
**Breaking:** PullMD now supports an authentication system. Existing installs keep working unchanged (default `PULLMD_AUTH_MODE=disabled`); operators who want auth must follow [`MIGRATION.md`](./MIGRATION.md).
diff --git a/package.json b/package.json
index 1eac5d3..586d626 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "pullmd",
- "version": "2.0.0",
+ "version": "2.1.0",
"type": "module",
"main": "server.js",
"license": "AGPL-3.0-or-later",
diff --git a/public/index.html b/public/index.html
index 95c3c26..62056b1 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1455,6 +1455,29 @@
Letzte Abrufe
}
}
+ (function restorePwaControls() {
+ try {
+ var v = localStorage.getItem('pullmd-comments');
+ if (v !== null) commentsToggle.checked = v === 'true';
+ v = localStorage.getItem('pullmd-frontmatter');
+ if (v !== null) frontmatterToggle.checked = v === 'true';
+ v = localStorage.getItem('pullmd-comment-depth');
+ if (v !== null) {
+ var n = parseInt(v, 10);
+ if (n >= 1 && n <= 10) depthInput.value = String(n);
+ }
+ } catch (e) {}
+ })();
+ commentsToggle.addEventListener('change', function () {
+ try { localStorage.setItem('pullmd-comments', String(commentsToggle.checked)); } catch (e) {}
+ });
+ frontmatterToggle.addEventListener('change', function () {
+ try { localStorage.setItem('pullmd-frontmatter', String(frontmatterToggle.checked)); } catch (e) {}
+ });
+ depthInput.addEventListener('change', function () {
+ try { localStorage.setItem('pullmd-comment-depth', depthInput.value); } catch (e) {}
+ });
+
function updateDepthVisibility() {
depthLabel.style.display = commentsToggle.checked ? '' : 'none';
}
diff --git a/public/sw.js b/public/sw.js
index 256b414..45a7195 100644
--- a/public/sw.js
+++ b/public/sw.js
@@ -1,4 +1,4 @@
-const CACHE_NAME = 'pullmd-v18';
+const CACHE_NAME = 'pullmd-v19';
const SHELL_URLS = ['/', '/index.html', '/manifest.json'];
self.addEventListener('install', (event) => {