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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user