diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-11-17 16:16:19 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-11-17 16:16:19 +0100 |
commit | f04cc581e195bb13803c9e18ca3a3865219e17d4 (patch) | |
tree | 04a8a239f75fd81c8ac7a792d8fb96f401bfa651 /docs/content/en/content-management/build-options.md | |
parent | cdd83bf3c885c16dc7976ed3697e600029f82bab (diff) | |
parent | 00c4484c7092181729f6f470805bc7d72e8ad17b (diff) |
Merge commit '00c4484c7092181729f6f470805bc7d72e8ad17b'
Diffstat (limited to 'docs/content/en/content-management/build-options.md')
-rw-r--r-- | docs/content/en/content-management/build-options.md | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/docs/content/en/content-management/build-options.md b/docs/content/en/content-management/build-options.md index 7bbb772df..f798754f1 100644 --- a/docs/content/en/content-management/build-options.md +++ b/docs/content/en/content-management/build-options.md @@ -1,19 +1,16 @@ --- title: Build Options -linktitle: Build Options +linkTitle: Build Options description: Build options help define how Hugo must treat a given page when building the site. -date: 2020-03-02 -publishdate: 2020-03-02 keywords: [build,content,front matter, page resources] -categories: ["content management"] +categories: [content management] menu: docs: - parent: "content-management" - weight: 31 -weight: 31 #rem -draft: false -aliases: [/content/build-options/] + parent: content-management + weight: 70 toc: true +weight: 70 +aliases: [/content/build-options/] --- They are stored in a reserved Front Matter object named `_build` with the following defaults: @@ -26,9 +23,10 @@ _build: {{< /code-toggle >}} #### render + If `always`, the page will be treated as a published page, holding its dedicated output files (`index.html`, etc...) and permalink. -{{< new-in "0.76.0" >}} We extended this property from a boolean to an enum in Hugo 0.76.0. Valid values are: +We extended this property from a boolean to an enum in Hugo 0.76.0. Valid values are: never : The page will not be included in any page collection. @@ -52,13 +50,13 @@ always (default) : The page will be included in all page collections, e.g. `site.RegularPages`, `$page.Pages`. local -: The page will be included in any _local_ page collection, e.g. `$page.RegularPages`, `$page.Pages`. One use case for this would be to create fully navigable, but headless content sections. {{< new-in "0.68.0" >}} +: The page will be included in any _local_ page collection, e.g. `$page.RegularPages`, `$page.Pages`. One use case for this would be to create fully navigable, but headless content sections. If true, the page will be treated as part of the project's collections and, when appropriate, returned by Hugo's listing methods (`.Pages`, `.RegularPages` etc...). #### publishResources -If set to true the [Bundle's Resources]({{< relref "content-management/page-bundles" >}}) will be published. +If set to true the [Bundle's Resources]({{< relref "content-management/page-bundles" >}}) will be published. Setting this to false will still publish Resources on demand (when a resource's `.Permalink` or `.RelPermalink` is invoked from the templates) but will skip the others. {{% note %}} @@ -70,6 +68,7 @@ Any page, regardless of their build options, will always be available using the ### Illustrative use cases #### Not publishing a page + Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else. ```yaml |