Skip to content

Simplify docs manifest structure#3108

Draft
manovotny wants to merge 7 commits intomainfrom
manovotny/simplify-docs-manifest
Draft

Simplify docs manifest structure#3108
manovotny wants to merge 7 commits intomainfrom
manovotny/simplify-docs-manifest

Conversation

@manovotny
Copy link
Copy Markdown
Contributor

@manovotny manovotny commented Feb 19, 2026

Note

This is only an experiment at this point.
https://github.com/clerk/clerk/pull/2144 is the other half of this PR.

Previews

What does this solve? What changed?

This PR refactors the documentation manifest system to use flat arrays and SDK-specific manifests instead of nested groups. It removes separators from the navigation structure and consolidates the architecture.

Key changes:

  • Reorganized docs/manifest.json to use flat array structure
  • Created docs/manifest.android.json and docs/manifest.ios.json for platform-specific navigation
  • Updated docs/manifest.schema.json to reflect new structure
  • Updated build scripts (build-docs.ts, delete-doc.mjs, move-doc.ts, lib/manifest.ts) to work with new structure
  • Updated corresponding tests

Deadline

No rush

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 19, 2026

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

Project Deployment Actions Updated (UTC)
clerk-docs Ready Ready Preview Mar 5, 2026 10:27pm

Request Review

manovotny and others added 4 commits February 19, 2026 18:02
- Flatten manifest.json from Array<Array<Item>> to Array<Item>
- Extract iOS/Android navigation into manifest.ios.json and manifest.android.json
- Remove all separator markers from manifest (no-ops at render time)
- Flatten manifest.ts types and traversal functions to single-loop
- Add readSDKManifest for validating SDK-specific manifest files
- Update build-docs.ts to process SDK manifests and output DocsNavigation format
  with { default: { sections }, overrides: { ios, android } }

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The build's second pass already computes group SDKs by bubbling up from
children's frontmatter. These 5 groups had sdk arrays that were either
redundant (16 SDKs = all except ios/android, which use override nav) or
derivable from children:

- Guides (16 SDKs) — redundant with ios/android overrides
- Reference (16 SDKs) — same
- Component customization (16 SDKs) — same
- Custom menu items (11 SDKs) — children have exact matching frontmatter
- Go (1 SDK) — child has sdk: go in frontmatter

Kept sdk on: 2 Getting started folders (structural, not derivable) and
2 external link items (no MDX to derive from).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Consolidate the two SDK-scoped Getting started folders into one,
moving sdk from folder-level to item-level for title differentiation.
Remove Demo repositories section (already linked in quickstarts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor manifest system to use flat arrays and SDK-specific manifests instead of nested groups. Removes separators and consolidates navigation structure. Updates build scripts and schema accordingly.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Fix move-doc.test.ts: use `parentPath ?? path` for Node v24 compatibility
  where Dirent.path was renamed to Dirent.parentPath
- Fix move-doc.ts: handle nested arrays in updateNavItem for manifest updates
- Sync manifest with main: add missing entries (waitlist-entries, backend
  types, task-setup-mfa, swiftui-previews, api-key-resource rename),
  replace stale MFA entries, remove nonexistent force-mfa entry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@NWylynko
Copy link
Copy Markdown
Contributor

I like the direction of this, removing the nested arrays alone is a massive improvement.

Given this is a fundamental change to the manifest, I don't think a simple flags.json flag will be sufficient to get this live. I think the best option is to have the build script downgrade the new manifest.json style to the existing manifest.json that clerk/clerk is expecting, and then also output to the dist a manifest.v2.json or something that is the new manifest syntax. This would allow a clerk/clerk pr to then pull in that new manifest and switch over seamlessly.

Additionally, given existing prs in clerk/clerk-docs probably have manifest.json changes, it would be great to have a pnpm migrate-manifest -> scripts/migrate-manifest.ts script that can be run to migrate the manifest over to the new syntax to reduce the chance of merge conflicts.

manovotny and others added 2 commits March 5, 2026 15:17
…cs-manifest

# Conflicts:
#	docs/manifest.json
- Unwrap nested arrays to flat arrays at all levels
- Remove Mobile Navigation section (handled by SDK-specific manifests)
- Merge Getting started groups into single group with SDK on items
- Add Integrations section to iOS and Android manifests
- Remove redundant sdk fields from Component customization, Custom menu
  items, and Go groups (frontmatter handles filtering)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants