docs/content/en/methods/page/Draft.md
raw| 1 | --- |
| 2 | title: Draft |
| 3 | description: Reports whether the given page is a draft as defined in front matter. |
| 4 | categories: [] |
| 5 | keywords: [] |
| 6 | params: |
| 7 | functions_and_methods: |
| 8 | returnType: bool |
| 9 | signatures: [PAGE.Draft] |
| 10 | --- |
| 11 | |
| 12 | 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. |
| 13 | |
| 14 | {{< code-toggle file=content/posts/post-1.md fm=true >}} |
| 15 | title = 'Post 1' |
| 16 | draft = true |
| 17 | {{< /code-toggle >}} |
| 18 | |
| 19 | ```go-html-template |
| 20 | {{ .Draft }} → true |
| 21 | ``` |