fix(plugin-docs-cli): limit doc page nesting to 3 #2745
Merged
Conversation
leventebalogh
approved these changes
Jun 25, 2026
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.
What this PR does / why we need it:
Adds the FS-7 max nesting depth rule to
@grafana/plugin-docs-cliwith a limit of 3 levels (soa/b/page.mdis fine buta/b/c/page.mdis too deep). Reportsinfoduringserveanderrorundervalidate --strict.We need a hard cap because the SidebarNav component on the marketing website only looks sensible up to a handful of nesting levels - past that the nav gets cramped and pages become hard to discover. Better to stop authors before they ship a structure the rendered nav can't handle than to paper over it in the website.
Which issue(s) this PR fixes:
Part of the docs validation epic.
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install website@5.6.1-canary.2646.26441606068.0 npm install @grafana/create-plugin@7.6.1-canary.2646.26441606068.0 npm install @grafana/plugin-docs-cli@0.0.11-canary.2646.26441606068.0 npm install @grafana/plugin-meta-extractor@0.12.3-canary.2646.26441606068.0 # or yarn add website@5.6.1-canary.2646.26441606068.0 yarn add @grafana/create-plugin@7.6.1-canary.2646.26441606068.0 yarn add @grafana/plugin-docs-cli@0.0.11-canary.2646.26441606068.0 yarn add @grafana/plugin-meta-extractor@0.12.3-canary.2646.26441606068.0