blob: 4beceeb6b0a69d7b5e3631223b7460c38f159ca3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
---
title: BuildDrafts
description: Reports whether the current build includes draft pages.
categories: []
keywords: []
params:
functions_and_methods:
returnType: bool
signatures: [SITE.BuildDrafts]
---
By default, draft pages are not published when building a site. You can change this behavior with a command line flag:
```sh
hugo --buildDrafts
```
Or by setting `buildDrafts` to `true` in your site configuration:
{{< code-toggle file=hugo >}}
buildDrafts = true
{{< /code-toggle >}}
Use the `BuildDrafts` method on a `Site` object to determine the current configuration:
```go-html-template
{{ .Site.BuildDrafts }} → true
```
|