Block new pages from being added to 11ty - #5703
Open
Yndira-E wants to merge 2 commits into
Open
Conversation
5 tasks
✅ 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
Summary
Following up on FlowFuse/website#5641 (review comment): a new landing page (
src/landing/opcua.njk) was added directly to the legacy 11ty stack instead of Nuxt, and there was no mechanism to catch that before merge. This adds one.nuxt/lib/legacy-pages.test.mjs: fetchesmainand fails if any.njkfile undersrc/doesn't already exist there (at its current tip or within the last 30 commits, so an unrelated rename/delete elsewhere onmaindoesn't retroactively fail an untouched PR). No allowlist to maintain — any new.njkfile, on any route, fails; editing an existing one is unaffected.npm testglob, so a failure here fails the already-requiredtest_website / Build and checkPR status check — this blocks merging with no change to branch protection / rulesets..njkonly. It does not catch a new page built as a bare.mdfile against an existing layout (11ty makes this possible without touching any.njk). Content directories that legitimately keep growing with new.mdentries —src/blog/,src/changelog/,src/customer-stories/,src/webinars/,src/blueprints/— need to stay unaffected, and reliably telling "new content" apart from "a new page wearing an existing layout" isn't something this check does..claude/CLAUDE.mdand the handbook call this gap out explicitly; avoiding it relies on following the written rule, not automated enforcement..claude/CLAUDE.md(engineers/AI agents) and the handbook (/handbook/marketing/website#new-pages-must-be-built-in-nuxt, marketing).adminteam can merge anyway via "Merge without waiting for requirements to be met".Test plan
npm testpasses (112/112).njkin an existing legacy directory (e.g.src/landing/) fails the check.njkin a brand-new, previously-unknown top-levelsrc/directory fails the check.njkpage does not failsrc/_includes/(a layout partial, not a page) does not failmainafter the PR branched is not retroactively flagged (reproduced with a real rename in an isolated repo, confirmed the 30-commit lookback catches it)Related Issue(s)
Checklist