feat: add soft-delete filter and content-warning support

Filter posts with `deleted: true` from all collections so soft-deleted
posts no longer appear on the blog. Add content-warning support: on
listing pages, CW posts show a warning label instead of content; on
single post pages, content is wrapped in a collapsible <details>.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-19 00:59:19 +01:00
parent a85a67c0d0
commit d9ac9bffc5
4 changed files with 45 additions and 5 deletions

View File

@@ -1028,7 +1028,7 @@ export default function (eleventyConfig) {
});
// Helper: exclude drafts from collections
const isPublished = (item) => !item.data.draft;
const isPublished = (item) => !item.data.draft && !item.data.deleted;
// Helper: exclude unlisted/private visibility from public listing surfaces
const isListed = (item) => {