Draft
Reports whether the given page is a draft as defined in front matter.
- Syntax
- PAGE.Draft
- Returns
- bool
By default, Hugo does not publish draft pages when you build your project. To include draft pages when you build your project, use the --buildDrafts command-line flag.
---
draft: true
title: Post 1
---+++
draft = true
title = 'Post 1'
+++{
"draft": true,
"title": "Post 1"
}
{{ .Draft }} → trueLast updated:
September 25, 2026
:
content: Hyphenate command-line when used as an adjective (2d644c5fa)
Improve this page