11ty: retire the second generator - #5795
Conversation
aad190a to
955d29b
Compare
e1c10b8 to
f7db070
Compare
|
Preview affected pages: This PR has no deploy preview of its own. Its base is It changes no rendered page: every route it touches is already served by Nuxt after PRs 1-17. What it moves is where the files live. The check is that the build still produces them, which is what Once PRs 1-17 have merged and this is retargeted to
|
|
Root cause of the failing The step runs It is not fixable in this repo. The argument is hardcoded at line 165 of Two things to expect when it is fixed: |
f7db070 to
20a1824
Compare
|
Rebuilt on current Changes from the previous version:
Checked locally: FlowFuse/github-actions-workflows#232 should merge before this. |
✅ Deploy Preview for flowfuse-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Every page is served by Nuxt, so the Eleventy build has nothing left to
generate. This removes it and moves what it still owned into the Nuxt app.
Moved, with no change to any URL:
- src/{blog,changelog,customer-stories,webinars}/**/*.md into nuxt/content/,
so the four collections that still carried `cwd: '../src'` are sourced like
every other collection.
- The images beside them into nuxt/public/ at the path they are served from
(nuxt/public/blog/2024/07/images/...). @nuxt/content resolves a relative
image in a post against the post's own directory, which is why these have to
mirror the content tree rather than sit in one flat directory.
- src/images/** into nuxt/public/images/. 181 of those files were already
byte-identical copies there, from earlier page ports; those are dropped
rather than moved. One differed: industries/automotive/1-connect-systems.png,
where the src copy is the compressed one production serves (the build copied
11ty's output over nuxt/public), so it replaces the nuxt copy.
- src/{events,landing,vs}/images into nuxt/public/ at the same paths.
- src/public/* to the root of nuxt/public/ (favicons, CNAME, security.txt),
which is where 11ty was copying them.
- src/_data/{site,chrome,blogTags,navHighlights,testimonials}.json,
events.yaml and team/ and guests/ into nuxt/data/. These are imported
directly by components and by nuxt.config; 11ty's `_data` convention was the
only reason they lived where they did.
- src/_includes/components/icons/*.svg into nuxt/assets/icons/, the nav icons
and the `ff:` icon collection. Four of them (arrows, pin, pulse, uns) already
had a cleaned-up copy there that the `ff:` collection renders; those are kept.
- src/_includes/analytics into nuxt/server/assets/analytics, a Nitro server
asset either way.
- src/css into nuxt/assets/css and src/js/cookieconsent-config.js into
nuxt/assets/js: build inputs, not published files.
- src/js/{nav-tracking,signup-popup}.js into nuxt/public/js/, which is where
app.head already loaded them from.
Removed: .eleventy.js and .eleventyignore, src/, lib/image-handler.js, the
Nunjucks includes and layouts, src/sitemap.njk (it built sitemap-legacy.xml,
which lists nothing now that no page is generated by 11ty, so robots.txt no
longer points at it), server/middleware/legacy.ts and the legacy-pages guard
that kept new .njk files out, style.eleventy.nav.css (no rule in it matches
anything Nuxt renders), the llms.txt note that part of the site is still on
Eleventy, and 15 dependencies.
nuxt/public is now a tracked asset tree rather than a build output directory,
so its .gitignore lists what a build writes into it instead of the reverse, and
clean:nuxt removes exactly those paths.
The dual build and dev scripts collapse into one of each: `npm run dev` starts
the Nuxt server with the CSS, docs and blueprint watchers beside it, and
`build:nuxt` no longer runs 11ty into nuxt/public first. netlify.toml's build
command and publish directory are unchanged, and `npm run blueprints` keeps its
name.
Two blog posts reference /img/ URLs from the retired image pipeline
(node-red-unified-namespace-architecture, images-in-node-red-dashboards). Both
already 404 in production; they are content fixes, not build ones, and are left
as they are.
The sitemap dates blog, changelog, customer-story, handbook, ebook and
whitepaper pages from the last commit that touched their file. That walk used
`git log --name-only`, which sees a moved file as new at its new path, so the
teardown's move of src/{blog,changelog,customer-stories,webinars} into
nuxt/content/ would have given every one of those pages the same lastmod: the
date of the move.
The walk now reads `--name-status -M100%` and follows exact moves back to the
old path, so a page keeps the date its content last changed. A move that also
edits the file still counts as a change, and deletions no longer date a path.
`-M100%` limits detection to exact moves, which git matches by blob id, so the
walk does not pay for content scoring on every commit.
.claude/CLAUDE.md still described the strangler-fig arrangement: two generators, a migration-status table, `npm start` for the 11ty stack, a src/ directory layout, Nunjucks layouts per content type, and a rule against adding a new .njk page enforced by a test that no longer exists. All of that is gone. What it says now: one Nuxt app, where each kind of content lives, and the two collections synced in from other repositories. The Blueprint Library gets a section of its own, since where it comes from and why it is gitignored here is the least obvious thing in the tree: resolved at build time, with an authenticated clone of the private library as the production path. The CTA section keeps its detail but loses the Nunjucks half and points at nuxt/lib/cta-destinations.ts, which has been the single source of that data since before this migration finished. The attribution rule and the Icons section are kept as they were, with the icon path moved to nuxt/assets/icons. README's blueprint table named the override `BLUEPRINTS_LOCAL`; the variable nuxt/lib/blueprints-sync.mjs reads is `FLOWFUSE_BLUEPRINTS_LOCAL`.
063394d to
cbe1c75
Compare
nuxt/assets/icons/ is the `ff` Nuxt Icon customCollection, and Nuxt Icon parses every SVG in it at build time. Ten of the nav icons moved from src/_includes/components/icons are bare <path> fragments, which NavIcon wraps in its own <svg> but Nuxt Icon cannot parse, so `nuxt build` failed with "Cannot read properties of undefined (reading 'attribs')". The nav art now lives in nuxt/assets/nav-icons/, byte-identical to what 11ty served, and nuxt/assets/icons/ is back to exactly the eight icons main has. That also drops the special case where four icons existed in both places with different markup: each set keeps its own copy.
11ty copied every images/ directory under src/ to its output, including the one in its template tree, so sixteen industry illustrations were also served from /_includes/images/industries/. The same files are at /images/industries/, so the old path now redirects there instead of returning a 404.
The lastmod walk read `git log` in date order, which interleaves branch commits with main's and lists no files for a merge. A branch cut before the teardown, edited under the old src/ path after it and merged in, was walked first and filed under the old name, so the page kept its pre-move date. `--first-parent -m` walks main's own history and lists what each merge changed against main, so the change is dated when it landed, under the path it has there. The fixture for a renamed-and-edited file now matches what `-M100%` prints (an add and a delete, not a partial rename), and a test builds a real repository with a move and a branch merged after it. That test fails without the new flags.
Nothing reads src/ any more, and many open PRs still touch it. A branch that adds a post in a new month directory merges cleanly into src/blog/ and the post is never built, with nothing reporting it. retired-src.test.mjs fails while git tracks anything under src/. icon-collection.test.mjs checks that every file in the directory nuxt.config.ts gives the `ff` icon collection has its own <svg> root. A bare <path> fragment there fails the whole Nuxt build with an error that does not name the file, which is how the nav icons first broke the build.
A checkout that ever ran the old build still holds its output: _site/, the eleventy-fetch .cache/, and what 11ty wrote into nuxt/public/ (the eleventy-img /img/ tree, sitemap-legacy.xml, the _includes/ image copies, two retired scripts). nuxt/public/ is tracked now, so without these rules that output shows up as untracked files and a local build copies it into nuxt/dist.
|
Verified and reviewed; fixes are pushed. Verification:
Fixed after review:
CI fails at Merge order: FlowFuse/github-actions-workflows#232, then this, then #5869. |
|
FYI: the failing build here isn't caused by this PR. Tracked in https://github.com/FlowFuse/engineering/issues/460. It's resolved now, re-running the checks. |
Comments that gave Eleventy as the live reason for a choice, or told a maintainer to keep something in sync with an 11ty template, now say what is true: the CTA `external` rationale, NodeTile's plain <a>, the /ai prerender entry (crawlLinks is off, so the entry is required), the chrome.json readers, the shared stylesheet notes, nav-tracking.js. Pointers to files that moved now name the new path. Historical "Ported from src/...njk" notes are left as they are. Handbook: changelog and blog screenshots go in nuxt/public/<section>/YYYY/MM/images/, not beside the post, where they would not be served. The website page no longer describes the 11ty keyword chain, the CTA split between renderers, or the deleted .njk check. The codebase guide and README name both icon sets and both Tailwind builds, say when future posts and analytics apply, and name BLUEPRINTS_REF. .claude/launch.json loses its eleventy entry.
6470fc4 to
1621c8d
Compare

Description
Every page is served by Nuxt, so this removes Eleventy.
src/still held intonuxt/(content/,public/,data/,assets/), with no URL changes..eleventy.js, the Nunjucks templates, the dev proxy and the 11ty dependencies.lastmoddates intact across the file moves, and redirects the one old image path that was only served by accident.src/, so an older PR cannot land files that are never built..claude/CLAUDE.md) for a Nuxt-only site.Merge FlowFuse/github-actions-workflows#232 first.
Related Issue(s)
Closes #5777
Checklist