-
Notifications
You must be signed in to change notification settings - Fork 0
7. Nav‐Bar Customization
nav-bar builds your site's navigation menu — the row of links (and dropdowns) across the top of every page. It's marked yellow: you're meant to edit it, including adding and removing menu items, but it's a bit more structural than pages or main-metadata, so it rewards reading this page first.
| Column | What it holds |
|---|---|
translate_id_nav |
An ID linking this menu item to its actual display text. Must match a row on the translation tab exactly (case-sensitive) — that's where the real label text ("Home", "Browse", "Timeline"...) lives, once for each language. |
stub |
The path or URL the item links to. A leading-slash path for an internal page (/browse.html), or a full https://... address for an external link. Left blank for items that are dropdown headers rather than links (see below). |
dropdown_parent |
Blank for a top-level menu item. To nest this item inside a dropdown, put the parent item's translate_id_nav value here. |
One clarification on the grey translate_id_nav column: unlike config's category column, this one isn't a fixed list — building your nav menu means adding and removing rows here. The grey fill just flags it as an ID value rather than free text: whatever you type must have a matching entry on translation, or the site won't know what label to show.
-
A top-level link —
dropdown_parentblank,stubfilled. Shows up directly in the navbar. In this template:nav-home(→/),nav-browse,nav-map,nav-timeline,nav-data. -
A dropdown header — both
dropdown_parentandstubblank. Doesn't link anywhere itself; it just creates a labeled dropdown that groups whichever child rows point to it. In this template:nav-visualization,nav-tags,nav-about,nav-learn. -
A dropdown child —
dropdown_parentfilled with a header row'stranslate_id_nav,stubfilled with the destination. Appears nested under that header. For example,nav-about-this-project,nav-method,nav-how-to-cite, andnav-contributeall setdropdown_parenttonav-about, so they appear together in an "About" dropdown.
Dropdown children don't have to point to a local page — nav-gender-in-spanish and nav-on-gender-inclusive-spanish (both nested under nav-learn) link out to https://www.genderinlanguage.com/..., showing external links work the same way as internal ones.
Top-level items appear left to right in the order their rows appear in the sheet, and — by the convention this template follows — each dropdown header is immediately followed by its own children in the rows underneath it. Keeping children grouped right after their parent isn't strictly required for the linking to work (that's driven by dropdown_parent matching, not position), but it keeps the sheet readable and is worth sticking to as you add your own items.
nav-bar only stores structure and IDs — no visible label text lives on this tab. To add a brand-new menu item, you need a row in both places:
- A row here on
nav-barwith a newtranslate_id_nav(e.g.nav-glossary), itsstub, and optionally adropdown_parent. - A matching row on the
translationtab with that same ID intranslate_id, plus the actual label text for each language.
Miss the second step and the menu item will appear with a blank or broken label instead of real text.
- Adding a
translate_id_navwith no matching row ontranslation— the label won't resolve. - A typo in
dropdown_parentthat doesn't exactly match an existing header'stranslate_id_nav— the child item won't nest where you expect. - Leaving
stubblank on an item that's meant to be clickable — it'll render as a dead link. - Reusing the same
translate_id_navon two different rows — the site won't be able to tell which one you mean.
As with every tab, changes here don't reach your live site until you run Sync content from Spreadsheet in GitHub Actions.