pagemeta: Make BuildConfig.Render an enum

Allowing links on pages without rendering them.

Fixes #7783
This commit is contained in:
Bjørn Erik Pedersen
2020-10-06 11:19:31 +02:00
parent c63db7f1f6
commit 634938908e
6 changed files with 107 additions and 25 deletions

View File

@@ -20,13 +20,24 @@ They are stored in a reserved Front Matter object named `_build` with the follow
```yaml
_build:
render: true
render: always
list: always
publishResources: true
```
#### render
If true, the page will be treated as a published page, holding its dedicated output files (`index.html`, etc...) and permalink.
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:
never
: The page will not be included in any page collection.
always (default)
: The page will be rendered to disk and get a `RelPermalink` etc.
link
: The page will be not be rendered to disk, but will get a `RelPermalink`.
#### list