Skip to content

fix(plugin-docs-cli): limit doc page nesting to 3 #2745

Merged
sunker merged 3 commits into
mainfrom
docs-cli/max-nesting-depth-2
Jun 25, 2026
Merged

fix(plugin-docs-cli): limit doc page nesting to 3 #2745
sunker merged 3 commits into
mainfrom
docs-cli/max-nesting-depth-2

Conversation

@sunker

@sunker sunker commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds the FS-7 max nesting depth rule to @grafana/plugin-docs-cli with a limit of 3 levels (so a/b/page.md is fine but a/b/c/page.md is too deep). Reports info during serve and error under validate --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

@sunker sunker marked this pull request as ready for review June 25, 2026 08:39
@sunker sunker requested a review from a team as a code owner June 25, 2026 08:39
@sunker sunker requested review from Ukochka, toddtreece and xnyo June 25, 2026 08:39
@github-project-automation github-project-automation Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Jun 25, 2026
@sunker sunker merged commit 95bb69a into main Jun 25, 2026
31 checks passed
@sunker sunker deleted the docs-cli/max-nesting-depth-2 branch June 25, 2026 08:56
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

2 participants