feat: add unlisted frontmatter field to hide posts from listings while keeping direct access

This commit is contained in:
Wayne Sutton
2025-12-30 15:22:46 -08:00
parent a5c30a1592
commit ac0dfab784
13 changed files with 262 additions and 13 deletions

View File

@@ -73,6 +73,7 @@ interface ParsedPost {
blogFeatured?: boolean; // Show as hero featured post on /blog page
newsletter?: boolean; // Override newsletter signup display (true/false)
contactForm?: boolean; // Enable contact form on this post
unlisted?: boolean; // Hide from listings but allow direct access via slug
}
// Page frontmatter (for static pages like About, Projects, Contact)
@@ -172,6 +173,7 @@ function parseMarkdownFile(filePath: string): ParsedPost | null {
blogFeatured: frontmatter.blogFeatured, // Show as hero featured post on /blog page
newsletter: frontmatter.newsletter, // Override newsletter signup display
contactForm: frontmatter.contactForm, // Enable contact form on this post
unlisted: frontmatter.unlisted, // Hide from listings but allow direct access
};
} catch (error) {
console.error(`Error parsing ${filePath}:`, error);