docs: instructions for pages of the shortcut section #434 #510 #522

This commit is contained in:
Sören Weber 2023-05-19 22:33:27 +02:00
parent 4218dc3978
commit d57ec1d5bc
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -129,4 +129,26 @@ Example from the current website:
weight = 40
````
Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus)
Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus)
## Shortcuts to pages inside of your project
If you have shortcuts to pages inside of your project and you don't want them to show up in page menu section, you have two choices:
1. Make the page file for the shortcut section a [headless branch bundle](https://gohugo.io/content-management/age-bundles/#headless-bundle) (contained in its own subdirectory and called `_index.md`) and add the following rontmatter configuration to the file (see exampleSite's `content/showcase`). This causes its content to **not** be ontained in the sitemap.
````toml
[_build]
render = "never"
list = "never"
publishResources = false
````
2. Store the page file for the shortcut section below a parent headless branch bundle and add the following frontmatter to he **parent**. In this case, the file itself can be a branch bundle, leaf bundle or simple page (see exampleSite's content/more/` and `content/more/credits`). This causes its content to be contained in the sitemap.
````toml
[_build]
render = "always"
list = "never"
publishResources = true
````