diff --git a/README.md b/README.md index 507a2ed0..a1dde564 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,8 @@ paige: style: link_href: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" # Local or remote file link_integrity: "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" # File integrity hash - menu_style: "links" # Menu is link list for "links", tab list for "tabs", or pill list if unset + menu_breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items + menu_style: "pills" # Menu item style; must be "links" or "pills"; default is "pills" metadata_max_width: "100ch" # Page metadata max width rss: managing_editor: "Michael Bluth" diff --git a/layouts/partials/paige/menu.html b/layouts/partials/paige/menu.html index 3ee8b652..7c0b3d9e 100644 --- a/layouts/partials/paige/menu.html +++ b/layouts/partials/paige/menu.html @@ -1,7 +1,7 @@ {{ $basepath := path.Clean (urls.Parse .Site.BaseURL).Path }} +{{ $breakpoint := .Site.Params.paige.menu_breakpoint | default "sm" }} {{ $links := false }} {{ $pills := false }} -{{ $tabs := false }} {{ if eq $basepath "/" }} {{ $basepath = "" }} @@ -10,20 +10,27 @@ {{ with .Site.Params.paige.menu_style }} {{ if eq . "links" }} {{ $links = true }} - {{ else if eq . "tabs" }} - {{ $tabs = true }} - {{ else }} + {{ else if eq . "pills" }} {{ $pills = true }} + {{ else }} + {{ errorf "invalid menu style: %q" . }} {{ end }} {{ else }} {{ $pills = true }} {{ end }} -