Render the nav and footer from one shared data file - #5460
Draft
dimitrieh wants to merge 3 commits into
Draft
Conversation
Both renderers hand-maintain the same mega nav and footer link lists, so removing a page needs the same edit in two places and CI does not catch a miss. This lifts the labels, hrefs, icon keys and grid placement classes out of the Eleventy layout into src/_data/chrome.json, generated from that layout so the rendered markup is unchanged. Named chrome.json rather than nav.json because base.njk already consumes a page-level 'nav' variable for the article:section meta tag, which blog frontmatter sets.
The mega nav and footer link lists were hand-maintained twice, once in the Eleventy layout and once in the Nuxt components, and nothing failed when the two drifted. Both now loop over src/_data/chrome.json, so adding or removing a page is one edit. Nuxt renders icons from the same SVG files Eleventy loads, through NavIcon and an explicit import map, so the glyphs have a single source too. The imports are listed rather than globbed because an eager glob would inline the whole icon directory into the client bundle. Verified as a rendering no-op on the Eleventy side: the served header markup and the header plus footer link sets are byte identical across five sampled pages, with only three HTML comments dropped from the footer. nuxt/lib/chrome.test.mjs guards the parts that can still drift: icon keys that resolve to no file, icon keys missing from the Nuxt map, the footer's deliberate 4/2/2/2 alignment split, and nav entries pointing at a path that redirects elsewhere. That last one is the gap that let a removed page keep a live nav link: adding a 301 makes the link checker accept the old URL, so a stale entry passes CI.
The guards only guard if something runs them, and no workflow ran npm test. Scoped to nuxt/lib so it does not pull in the handbook tests, which read real git history that the shallow CI checkout does not have.
dimitrieh
marked this pull request as draft
July 31, 2026 16:07
✅ Deploy Preview for flowforge-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for flowforge-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
The mega nav and footer link lists were maintained by hand in two places,
src/_includes/layouts/base.njkand the NuxtAppHeader/AppFootercomponents, and nothing failed when the two drifted. Both now render fromsrc/_data/chrome.json, so adding or removing a page is one edit. Nuxt draws icons from the same SVG files Eleventy loads, viaNavIconand an explicit import map, giving the glyphs a single source too.Verified as a rendering no-op on the Eleventy side: served header markup and the header plus footer link sets are byte identical across five sampled pages, with only three HTML comments dropped. The Nuxt render needs checking on the deploy preview.
nuxt/lib/chrome.test.mjsguards what can still drift, including nav entries that point at a redirected path. That is the gap that let the removed education page keep a live nav link: adding a 301 makeshyperlinkaccept the old URL, so a stale entry passes CI.Related Issue(s)
Follows the leftover nav link found reviewing #5451. That PR removes the two education entries from the old markup; once it lands they come out of
chrome.jsoninstead.Checklist