From b87498f91f5a9362458c2c52a462e04339131434 Mon Sep 17 00:00:00 2001 From: Kian Kasad Date: Tue, 15 Dec 2020 09:49:54 -0800 Subject: [PATCH] add menu info to how-to guide --- content/posts/papermod/papermod-how-to.md | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/content/posts/papermod/papermod-how-to.md b/content/posts/papermod/papermod-how-to.md index 40f91ce8..9d2d88ab 100644 --- a/content/posts/papermod/papermod-how-to.md +++ b/content/posts/papermod/papermod-how-to.md @@ -128,6 +128,35 @@ and contents of `extend_footer.html` will be added to bottom of page. --- +## Add menu to site + +You can add menu entries which will appear in the header of every page. + +To do so, add a `menu` section to your site's `config.yml`: +```yml +menu: + main: + - identifier: categories + name: categories + url: /categories/ + weight: 10 + - identifier: tags + name: tags + url: /tags/ + weight: 20 + - identifier: example + name: example.org + url: https://example.org + weight: 30 +``` +`name` controls what will be displayed for the menu entry. +`url` sets the URL that the entry points to. +`weight` is used to control the positioning of entries. + +For more information on menus, see the [Hugo wiki page](https://gohugo.io/content-management/menus/). + +--- + ## Pin a Post Post can be pinned/ displayed top on the list by adding a `weight=` var to page-variables