Expand description
The retired-id ledger: _retired.md, a frontmatter map of reserved
id -> title. Closing, retiring, renumbering, or deleting a document
records its id here so the global id sequence never hands the number out
again; the title is kept for human reference (git records the when and why).
This supersedes the pre-0.12 plaintext _retired.txt (ID # retired …).
A legacy ledger is read on load and migrated to _retired.md on the next
write. Reusing frontmatter + the refs id->title map machinery means one
less bespoke format to parse.
Constants§
- FIELD
- The frontmatter key holding the reserved
id -> titlemap. - FILE
- The ledger filename.
- LEGACY_
FILE - The pre-0.12 plaintext ledger, migrated to
FILEon the next write.
Functions§
- legacy_
path - Path to the legacy plaintext ledger under
base. - path
- Path to the markdown ledger under
base. - read
- The ledger as
(id, title)pairs sorted by number. Prefers_retired.md; falls back to the legacy plaintext ledger (ids only, empty titles). A missing ledger reads as empty. - serialize
- Render
(id, title)entries (sorted by number) to the ledger file’s text.