diff --git a/README.md b/README.md index aec4fa11..357a0cb0 100644 --- a/README.md +++ b/README.md @@ -346,7 +346,7 @@ link = "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the t ### Menu -An optional menu can be configured. +The menu can be configured using the `main` menu. The active menu item has a URL that is a prefix of the path of the current page. A menu item with the URL `/` only matches a `/` path. diff --git a/layouts/partials/paige/site-header.html b/layouts/partials/paige/site-header.html index e734d79f..57b146dd 100644 --- a/layouts/partials/paige/site-header.html +++ b/layouts/partials/paige/site-header.html @@ -6,7 +6,7 @@ {{ $first := templates.Exists "partials/paige/site-header-first.html" }} {{ $last := templates.Exists "partials/paige/site-header-last.html" }} {{ $links := false }} -{{ $menu := site.Menus.main | and ($page.Param "paige.site.disable_menu" | not) }} +{{ $menu := $page.Param "paige.site.disable_menu" | not }} {{ $pills := false }} {{ $tabs := false }} {{ $title := $page.Param "paige.title" | default site.Title | markdownify | and ($page.Param "paige.site.disable_title" | not) }} @@ -46,44 +46,72 @@