hugo/docs/content/en/news/0.86.0-relnotes/index.md

5 KiB


date: 2021-07-21 title: "Hugo 0.86.0: Cascade in Config" description: "Hugo 0.86.0 adds cascade keyword to site config, much improved "active menu item" logic for section pages, and more." categories: ["Releases"]

This release is a set of smaller fixes and improvements. Some of the more notable:

You can now have a top level cascade (or one per language, if needed) section in your site configuration (e.g. config.toml). This way you can control default front matter values from outside of the content files.

Hugo's Menu system works well, but hasn't been particularly easy to set the active menu state for section pages without a menu definition. We have had the option Section Menu for Lazy Bloggers. That helped for the common case, but we have now made it behave more sensible out of the box: $page.HasMenuCurrent $sectionMenuEntry will now always return true for any descendant of that section. To support this for menu definitions in the site config, we have added a new pageRef option on MenuEntry:

[[menus.main]]
pageRef = "blog"
# When pageRef is set, setting `url` is optional; it will be used as a fallback if the page is not found.
url = "/blog"

Set pageRef to a value that site.GetPage understands, and the menu entry will be correctly connected to the page.

This release represents 14 contributions by 2 contributors to the main Hugo code base. Many have also been busy writing and fixing the documentation in hugoDocs, which has received 1 contributions by 1 contributors.

Hugo now has:

Enhancements

Other

Fixes

Other