Nav Generation
Navigation, at the moment, is auto-generated for docs and blog archetypes,
and specified in a file named navbar.yml
for static header and footer links.
The goal is to have as much auto-generated as possible, taking clues from individual
_data.yml
files in each directory as needed.
Main Files Of Interest Right Now
Most of the navigation happens in src/_includes/partials/nav.vto
, where (from top down)
we go from left to right for the normal, full-size nav.
From there, we get to the responsive fly-out nav, which begins at:
<div role="presentation" class="navbar-sidebar__backdrop"></div>
This is the backdrop that's shown if you're in a documentation or blog area
and is auto-generated, followed by the navigation links controlled by the
navbar.yml
file.
This file also controls the footer links and footer group headings.
The "menu" Frontmatter Settings
In frontmatter (page.data
) you'll see a menu
object with two settings:
order
and visible
.
By default, every page or post or document (or source file processed by lume)
has its visibility set to true
, and order
set to 0
, which is essentially
no more, no less important than anything else in terms of navigation.
This is a setting that doesn't yet control all aspects of navigation and things of that nature, but could if you wanted it to. It's there for you to build on.
It's currently used when displaying auto-nav links in the blog and documentation,
(passed along to the search functions), and set by default in the root _data.yml
file, so you can count on it being there unless you change it.
If you set an individual page to visible: false
, it shouldn't be picked up by the
auto nav, or plugins like comp.latestBlog()
, or listed in the archive. If you find
a case where that isn't true, a PR is most welcome. The feature is there to help you
create pages that exist, but require a link to find.
Better coordination with the Sitemap generator plugin is planned, but not yet started.
Roadmap
We should be able to implement the menu
hook on everything, in addition to
some help from _data.yml
files to almost completely generate the navigation
leaving room for what is usually manual anyway.
The nav generation in docs/
is more important for current focus, YAML is
fine for now for static links.
In This Section:
Cushy Theme Docs:
Feedback submitted, thank you! We'll try not to ask you about this page again.
Was reading this article a good use of your time?