Skip to content

Block new pages from being added to 11ty - #5703

Open
Yndira-E wants to merge 2 commits into
mainfrom
chore/block-new-11ty-pages
Open

Block new pages from being added to 11ty#5703
Yndira-E wants to merge 2 commits into
mainfrom
chore/block-new-11ty-pages

Conversation

@Yndira-E

@Yndira-E Yndira-E commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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: fetches main and fails if any .njk file under src/ doesn't already exist there (at its current tip or within the last 30 commits, so an unrelated rename/delete elsewhere on main doesn't retroactively fail an untouched PR). No allowlist to maintain — any new .njk file, on any route, fails; editing an existing one is unaffected.
  • Picked up by the existing npm test glob, so a failure here fails the already-required test_website / Build and check PR status check — this blocks merging with no change to branch protection / rulesets.
  • Scope is deliberately .njk only. It does not catch a new page built as a bare .md file against an existing layout (11ty makes this possible without touching any .njk). Content directories that legitimately keep growing with new .md entries — 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.md and the handbook call this gap out explicitly; avoiding it relies on following the written rule, not automated enforcement.
  • Documented in .claude/CLAUDE.md (engineers/AI agents) and the handbook (/handbook/marketing/website#new-pages-must-be-built-in-nuxt, marketing).
  • If a page genuinely must ship on 11ty before its Nuxt equivalent exists, a member of the GitHub admin team can merge anyway via "Merge without waiting for requirements to be met".

Test plan

  • npm test passes (112/112)
  • New .njk in an existing legacy directory (e.g. src/landing/) fails the check
  • New .njk in a brand-new, previously-unknown top-level src/ directory fails the check
  • Editing an existing .njk page does not fail
  • New file under src/_includes/ (a layout partial, not a page) does not fail
  • A file renamed away by an unrelated commit on main after 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

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

@netlify

netlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit 6741203
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a9168649a5d3200088335ad
😎 Deploy Preview https://deploy-preview-5703--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 68 (🟢 up 16 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 85 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant