summaryrefslogtreecommitdiffstats
path: root/docs/content/en/methods/site/BuildDrafts.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/methods/site/BuildDrafts.md')
-rw-r--r--docs/content/en/methods/site/BuildDrafts.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/content/en/methods/site/BuildDrafts.md b/docs/content/en/methods/site/BuildDrafts.md
new file mode 100644
index 000000000..0d85c78fd
--- /dev/null
+++ b/docs/content/en/methods/site/BuildDrafts.md
@@ -0,0 +1,28 @@
+---
+title: BuildDrafts
+description: Reports whether the current build includes draft pages.
+categories: []
+keywords: []
+action:
+ related: []
+ 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
+```