fuzzyworld

fuzzyworld-tools / commit

Plan: blog post metadata (front matter and config) and protected posts skipped

795e51b35e7a44eb6336b49b8b0e57230de68d5c · Pavel Safronov · 2026-10-28 22:14:35 -0700 · parents 77346d8a0380

Claude Code usage: this commit ≈0 out / ≈0 cached · cost unknown (no per-model trailer) · session 5 tally 100 in / 67.5K out / 2.7M cached · usage by commit and session

Plan: blog post metadata (front matter and config) and protected posts skipped

FW-Tokens-In: 100
FW-Tokens-Out: 67496
FW-Tokens-Cached: 2734373
FW-Session: 097a3371-8cf6-4ab9-8ad9-cb4b333b66af
FW-Rtk-Saved: 2548822
FW-Rtk-Cmds: 6132

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
 PLAN.md | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/PLAN.md b/PLAN.md
index d16e2ec..9ab37d5 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -92,8 +92,7 @@ always-on machine; a small setup is a DreamHost account and a laptop.
   has 138 posts). Tags are the real structure (a story series is a tag, e.g. Dice, Walkabout, Writing Excuses).
 - Pages: **Highlights** (the front page: a chronological list of the work I consider good, with an AI-use note),
   **Blog** (all posts), **Collections** (series in reading order, a hand-written list), **Upcoming**.
-- 2 posts are password-protected (Rasputin, Belfast). Static answer: HTTP basic auth in `.htaccess`, or
-  client-side encryption; to be chosen.
+- 2 posts are password-protected (Rasputin, Belfast). They are not carried over (see Protected posts below).
 - A reading time on each post, media (images, plus epub/kpf/pdf downloads of Wick Canyon), and comments.
 - Comments: 45 (36 top-level, 8 replies). They get imported, as static text with the author's name (no emails).
 
@@ -105,9 +104,26 @@ the others are notes. WordPress turns single line breaks into `<br>`, so the ren
 **Findings that shape the design:**
 - File names do **not** match published URLs. Only 13 of 144 posts match `date-slug`: the publish date differs from the
   draft date, and some names differ (`belfast-porn.md` is published as `/belfast/`). The import must record the mapping
-  (published date, slug, tags, highlighted, password) somewhere. Proposal: add small front matter to each file once.
+  (published date, slug, tags, highlighted) somewhere.
 - So the generator must keep the old URLs working: same path pattern and the same slugs.
 
+**Post metadata** (decided 2026-10-28): front matter *and* config, so the tool does not force edits to source files.
+Precedence, highest first:
+
+1. front matter in the file (`date`, `slug`, `tags`, `highlight`, `published`);
+2. per-file overrides in the blog's JSON file, keyed by file name (a "sidecar" for people who will not or cannot edit
+   their files);
+3. defaults from the file: date and name from `YYYY-MM-DD-name.md`, title from the first `# heading`.
+
+Nothing is required: a plain folder of Markdown works. **Nothing is published unless marked** (`published` in front
+matter or an entry in the config): `~/Blog` has 286 files and 144 posts are live. This is the same rule as repo
+visibility (private unless exactly `public`). For `~/Blog`, the import writes the sidecar (your files stay untouched;
+easy to undo), and a later command can convert it to front matter, e.g. when the posts move to a private git repo.
+
+**Protected posts** (decided 2026-10-28): not carried over. The importer skips password-protected posts (Rasputin,
+Belfast) and the comments on them, and says so. They stay drafts in `~/Blog`. 🔌 plugin idea for later: `.htaccess`
+basic auth first; client-side encryption only if needed (it adds a script and allows offline guessing).
+
 **Design:**
 - One JSON file describes a blog (title, base URL, source folder, which section is the post body, URL pattern, tag
   list, highlight list, collections, feed). The tool is `gen.py` run on a repo of Markdown, from the push hook.