diff --git a/docs/content/extras/menus.md b/docs/content/extras/menus.md index c7450547e..bcdee6afa 100644 --- a/docs/content/extras/menus.md +++ b/docs/content/extras/menus.md @@ -12,6 +12,9 @@ weight: 60 Hugo has a simple yet powerful menu system that permits content to be placed in menus with a good degree of control without a lot of work. + +*TIP:* If all you want is a simple menu for your sections, see [Section Menu for "the Lazy Blogger"]({{< relref "#section-menu-for-the-lazy-blogger" >}}). + Some of the features of Hugo Menus: * Place content in one or many menus @@ -183,3 +186,42 @@ The following is an example: + + +## Section Menu for "the Lazy Blogger" + +To enable this menu, add this to your site config, i.e. `config.toml`: + +``` +SectionPagesMenu = "main" +``` + +The menu name can be anything, but take a note of what it is. + +This will create a menu with all the sections as menu items and all the sections' pages as "shadow-members". The _shadow_ implies that the pages isn't represented by a menu-item themselves, but this enables you to create a top-level menu like this: + +``` + + +``` + +In the above, the menu item is marked as active if on the current section's list page or on a page in that section. + +The above is all that's needed. But if you want custom menu items, e.g. changing weight or name, you can define them manually in the site config, i.e. `config.toml`: + +``` + [[menu.main]] + name = "This is the blog section" + weight = -110 + identifier = "blog" + url = "/blog/" + +``` + +**Note** that the `identifier` must match the section name. + diff --git a/docs/content/meta/release-notes.md b/docs/content/meta/release-notes.md index 86db98a81..2edab3014 100644 --- a/docs/content/meta/release-notes.md +++ b/docs/content/meta/release-notes.md @@ -21,7 +21,7 @@ Work In Progress. * Show help information to Windows users who try to double click on `hugo.exe`. * Add experimental support for [`Mmark`](https://github.com/miekg/mmark) markdown processor * Add `AsciiDoc` support using external helpers. -* Add section menu support for _the lazy blogger_ +* Add section menu support for a [Section Menu for "the Lazy Blogger"]({{< relref "extras/menus.md#section-menu-for-the-lazy-blogger" >}}) * Add shortcode support for HTML files * Allow the same `shortcode` to be used with or without inline content * Some important bugfixes: