You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify page expiration to be consumer-driven (#19)
Page expiration was over-built: it included an operator-side, server-read
namespace policy (PUB_NAMESPACE_CONFIG) that made enabling expiration a
deployment concern. That decision belongs to the publisher, not the operator.
- Remove src/core/namespace-config.ts, PUB_NAMESPACE_CONFIG, and the
resolveNamespaceExpiration option. The server now simply honors the
expiration it is sent.
- Let a consumer set a default in their own CLI config
(~/.config/pub/config.json): top-level `defaultExpires` and/or per-namespace
`expires`. The CLI sends the explicit --expires flag as `expires` and the
config default as a separate, lower-priority `defaultExpires`.
- Precedence (most specific wins): --expires flag → document frontmatter/
<meta> → namespace config → global default. This keeps a page's own
`expires: never` able to pin it even under a namespace default.
Per-page expiration needs no server configuration at all.
Claude-Session: https://claude.ai/code/session_01YNt2ZWLzXwnH6zonhVSQ41
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/progress.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,4 +19,5 @@
19
19
- 2026-04-03: Added Obsidian-style callout rendering with aliases, collapsible `+`/`-` support, and type-specific styling. Verified with `npm run verify` and local browser QA screenshots.
20
20
- 2026-06-25: Added opt-in review annotations for published markdown/HTML pages. `--review`, markdown `review: true`, or HTML `<meta name="pubmd:review" content="true">` injects inline comments, hover targeting, per-comment deletion, and a copyable feedback prompt while preserving raw source.
21
21
- 2026-06-25: Refined review annotations into comment-mode sharing. `--comments`, markdown `comments: true`, and HTML `<meta name="pubmd:comments" content="true">` are now the preferred opt-ins. The CLI prints `?comments=1` for commentable pages, and removing the query string keeps the same page readable without comment UI.
22
-
- 2026-06-29: Added expiring pages (TTL). Pages never expire by default; a TTL can be set per page (`--expires`, frontmatter `expires:`, or `<meta name="pubmd:expires">`), per namespace (server `PUB_NAMESPACE_CONFIG` policy so sensitive namespaces expire by default), or via a global default, with most-specific-wins precedence and a 14-day default when no duration is given. Expired pages return 404 and drop out of `list`; the CDN cache is capped at the deadline. Verified with `npm run verify`.
22
+
- 2026-06-29: Added expiring pages (TTL). Pages never expire by default; a TTL can be set per page (`--expires`, frontmatter `expires:`, or `<meta name="pubmd:expires">`), with a 14-day default when expiration is enabled without a duration. Expired pages return 404 and drop out of `list`; the CDN cache is capped at the deadline. Verified with `npm run verify`.
23
+
- 2026-06-29: Simplified expiration to be fully consumer-driven. Removed the operator-side `PUB_NAMESPACE_CONFIG` server policy (and the `namespace-config` module) — the server now just honors the `expires` it is sent. Consumers set a default in their own CLI config (`~/.config/pub/config.json`): top-level `defaultExpires` and/or per-namespace `expires`, with precedence flag → namespace → global. No server configuration is required to use expiration.
0 commit comments