hugo/docs/content/en/methods/site/BuildDrafts.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

633 B

title description categories keywords action
BuildDrafts Reports whether the current build includes draft pages.
related returnType signatures
bool
SITE.BuildDrafts

By default, draft pages are not published when building a site. You can change this behavior with a command line flag:

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:

{{ .Site.BuildDrafts }} → true