Skip to content

docs: restructure to shadcn-style hierarchical IA#39

Open
abdout wants to merge 1 commit into
mainfrom
docs/shadcn-ia-restructure
Open

docs: restructure to shadcn-style hierarchical IA#39
abdout wants to merge 1 commit into
mainfrom
docs/shadcn-ia-restructure

Conversation

@abdout
Copy link
Copy Markdown
Contributor

@abdout abdout commented May 18, 2026

Summary

Mirrors shadcn/ui's hierarchical docs IA. 35 flat MDX files now live in 5 sections (installation/, engine/, operations/, reference/, resources/), with per-folder meta.json and a sidebar rewrite. Old URLs keep working via 70 temporary redirects.

This is Phase 1 of 4. Phases 2-4 (page-template rewrites, new sections, polish) ship as follow-up PRs.

Changes

  • Content moved (35 files): flat → installation/, engine/, engine/agents/, operations/, reference/, resources/. Git tracks each as a rename at 97-100% similarity, full history preserved.
  • meta.json per folder (7 new): drives Fumadocs nav order; replaces the old flat list with separator strings.
  • Sidebar rewrite: DOCS_NAV in src/components/docs/docs-sidebar.tsx now renders five sections (Getting Started / Engine / Operations / Reference / Resources) plus Introduction.
  • 70 redirects in next.config.ts: 35 old slugs × 2 lang variants (/docs/<old> and /:lang/docs/<old>). Using permanent: false (307). Flip to 301 after ~7 days of monitoring.
  • scripts/check-docs-links.mjs + pnpm docs:check: validates every /docs/* link in MDX resolves to a real file. Currently passes 0/36.
  • Duplicate H1 stripped: page wrapper at app/[lang]/(root)/docs/[[...slug]]/page.tsx:61 already renders title from frontmatter; the body # Title line removed from 34 files to eliminate double H1.
  • Inline cross-links updated in installation/index.mdx so internal links go direct, not via 307 hop.

Test plan

  • pnpm docs:check clean
  • next build succeeds — 36 docs routes generated, all under new paths
  • After deploy: spot-check 5 redirects, e.g. /en/docs/agents/en/docs/engine/agents, /en/docs/onboarding/en/docs/installation
  • After deploy: sidebar renders 5 sections correctly in light/dark/RTL
  • After 7 days: run site:kun.databayt.org on Google, verify all indexed old URLs 307; if clean, flip redirects to 301

Out of scope

  • Page-template rewrites (Phase 2)
  • Installation split / new resources sections (Phase 3)
  • Hover anchors / badges / Cmd+K search / mobile sidebar (Phase 4)
  • Arabic deploy fix — generateStaticParams still hardcodes `lang: "en"` in `page.tsx:17` (parallel concern)

🤖 Generated with Claude Code

Move 35 flat MDX files into five subdirectories that mirror shadcn/ui's
docs IA: installation/, engine/, engine/agents/, operations/, reference/,
resources/. Strip the duplicate body H1 from each file — the page wrapper
already renders the title from frontmatter, so the body heading was
producing two H1s per page.

Why: the previous flat layout made shadcn-style sectioning impossible
and broke the visual hierarchy users expect from a modern docs site.
Hierarchical folders let Fumadocs auto-derive nav from meta.json and
unlock per-section page templates in later phases.

- 7 new meta.json files declare per-folder page order
- DOCS_NAV in docs-sidebar.tsx rewritten to 5 top-level sections plus
  Introduction; existing renderLink/SidebarGroup markup unchanged
- 70 redirects (35 old slugs × 2 lang variants) keep old URLs working
  as 307 (temporary). Flip to 301 after 7 days of monitoring.
- scripts/check-docs-links.mjs validates that every /docs/* link in
  MDX resolves to a real file; exposed as `pnpm docs:check`
- 8 inline cross-links in installation/index.mdx updated to new paths
  to avoid 307 hops within the docs site itself

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kun Ready Ready Preview, Comment May 18, 2026 5:20am

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