Draft Post Example
Published Sep 28, 2024
⋅
Updated Sep 28, 2024
⋅
1 minutes read
This is an example of a draft post. It demonstrates how the draft system works in our markdown blog.
##Key Features
- Development Visibility: This post is visible when running in development mode
- Production Hidden: It will be hidden when the site is built for production
- Author Preview: Content creators can preview their work before publishing
##How It Works
The draft system uses the draft: true frontmatter field to control visibility:
---
title: "This is a Draft Post"
draft: true # This makes it a draft
---##When You'll See This
You'll only see this post when:
- Running
bun run dev(development mode) - The
NODE_ENVis set to "development" - You're previewing content before publication
##When It's Hidden
This post will be hidden when:
- Building for production (
bun run build) - The site is deployed to production
NODE_ENVis set to "production"
##Publishing
To publish this post, simply change the frontmatter:
---
title: "This is a Draft Post"
draft: false # Changed from true to false
---Then rebuild and redeploy your site!
This draft post helps demonstrate the content management workflow.