diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-12-04 15:24:01 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-12-04 15:24:01 +0100 |
commit | d19ed4d4e69f51873135f05a51831d25ecc2071e (patch) | |
tree | 74dfd9af2b0f4a6c0933266c50ceaa569d388c71 /docs/content/en/methods/site/BuildDrafts.md | |
parent | 9f978d387f8b7cb6bc03fe6b4dd52bb16862a784 (diff) | |
parent | 35dec7c96f7ee3eb17dd444f7067f0c776fb56ae (diff) | |
download | hugo-d19ed4d4e69f51873135f05a51831d25ecc2071e.tar.gz hugo-d19ed4d4e69f51873135f05a51831d25ecc2071e.zip |
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
Diffstat (limited to 'docs/content/en/methods/site/BuildDrafts.md')
-rw-r--r-- | docs/content/en/methods/site/BuildDrafts.md | 28 |
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 +``` |