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:
February 23, 2026
:
content: Rename site configuration to project configuration (phase 2) (9243e9f6b)
Improve this page