From d57ec1d5bca5bfb2b0d642389febae7f73e245d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 19 May 2023 22:33:27 +0200 Subject: [PATCH] docs: instructions for pages of the shortcut section #434 #510 #522 --- exampleSite/content/cont/menushortcuts.en.md | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/cont/menushortcuts.en.md b/exampleSite/content/cont/menushortcuts.en.md index e133921599c..e3d73c1ebc7 100644 --- a/exampleSite/content/cont/menushortcuts.en.md +++ b/exampleSite/content/cont/menushortcuts.en.md @@ -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) \ No newline at end of file +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 + ````