Skip to main content
Draft

Draft Post Example

Shiloh
Shiloh
1 min read

This post demonstrates the draft feature. Draft posts are hidden in production but visible during development.

Draft Behavior #

When draft: true is set in front matter:

  • Post is hidden in production builds (hugo)
  • Post is visible when running hugo server with --buildDrafts
  • A “Draft” label appears on the article

Draft Label #

The draft label is controlled by:

params:
  article:
    showDraftLabel: true

Use Cases #

Work in Progress #

Mark unfinished articles as drafts while you continue writing.

Scheduled Content #

Prepare content in advance. Remove the draft flag when ready to publish.

Review Process #

Use drafts for content that needs review before publication.

Building with Drafts #

Include drafts in your build:

hugo --buildDrafts
hugo server --buildDrafts

Or set in config:

buildDrafts: true
Shiloh
Author
Shiloh - A Happy Dog

Built with Tailwind CSS v4 and daisyUI v5