From 38488afb15e38ccefdfcde1093a4e88925670ac7 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Thu, 19 Mar 2026 01:00:41 +0100 Subject: [PATCH] docs: document soft-delete filter and content-warning support Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 10 ++++++++++ README.md | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index f8ca744..76d60b4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,6 +40,14 @@ Posts carry a `gardenStage` front-matter value: `seedling`, `budding`, `cultivat ### AI Disclosure Posts declare AI involvement level in front matter (e.g. `aiCode: T1/C2`). Rendered as a badge below post content and as a hidden `.p-ai-code-level` span in list cards. +### Soft-delete filtering +Posts with `deleted: true` in frontmatter are excluded from all Eleventy collections by the `isPublished()` helper in `eleventy.config.js`. This supports ActivityPub soft-delete — when a post is deleted via the AP admin, it disappears from the blog without removing the file. + +### Content warnings +Posts with `contentWarning` or `content_warning` in frontmatter are handled in two contexts: +- **Single post page** (`post.njk`): Content is wrapped in a collapsible `
` element with an amber warning banner. The user must click to reveal the content. +- **Listing pages** (`blog.njk`): All 7 card types (like, bookmark, repost, reply, photo, article, note) replace content with a warning label + "View post" link. Photo cards also hide the gallery. + ### Nested tags Categories use Obsidian-style path notation (`lang/de`, `tech/programming`). The `nestedSlugify()` function in `eleventy.config.js` preserves `/` separators during slug generation. Slugification is applied per segment. @@ -135,4 +143,6 @@ BLUESKY_HANDLE svemagie - **Markdown Agents** — clean Markdown served to AI crawlers - **Mermaid diagrams** — `eleventy-plugin-mermaid` integrated - **Changelog page** — commit-type tabs (feat/fix/perf/a11y/docs) via IndieKit GitHub endpoint +- **Soft-delete filtering** — posts with `deleted: true` excluded from all collections +- **Content-warning support** — collapsible content on post pages, hidden content on listings - **Upstream drift check script** — `scripts/check-upstream-widget-drift.mjs` diff --git a/README.md b/README.md index aaeb754..dfa8d6b 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,14 @@ Posts declare their AI involvement level in front matter. The AI badge renders b ### Nested tags Categories support Obsidian-style path notation (`lang/de`, `tech/programming`). The `nestedSlugify` function in `eleventy.config.js` preserves `/` separators during slug generation. +### Soft-delete filtering +Posts with `deleted: true` in frontmatter are excluded from all Eleventy collections. This supports ActivityPub soft-delete — the post disappears from the blog without the file being removed. + +### Content warnings +Posts with `contentWarning` or `content_warning` in frontmatter get special handling: +- **Post page**: content is behind a collapsible `
` with an amber warning label +- **Listing pages**: content (and photos) replaced by a warning + "View post" link + ### Upstream drift check ```bash npm run check:upstream-widgets # Report widget drift vs theme remote