Skip to content

chore(docs): implement versioned documentation system#339

Open
bowheart wants to merge 1 commit intomasterfrom
bowheart/docs-versioning-system
Open

chore(docs): implement versioned documentation system#339
bowheart wants to merge 1 commit intomasterfrom
bowheart/docs-versioning-system

Conversation

@bowheart
Copy link
Copy Markdown
Collaborator

Summary

Implements a complete versioned documentation system for Zedux:

  • All existing docs migrated to docs/v1/ for version 1 documentation
  • New docs/v2/ folder for v2 beta docs (populated via '🚧 v2 beta docs' section in sidebars.js)
  • New docs/next/ folder for unreleased/development docs
  • Smart unversioned URL resolution using layered fallbacks (redirects → current version → stale with banner)
  • Version selector dropdown in navbar for easy switching between doc versions
  • StaleBanner component displayed on all non-current version pages
  • docs-version-resolver plugin for smart routing and version detection
  • Sidebar-based source of truth for which docs are "ready" in each version
  • Explicit redirect mapping in version-map.js for restructured/removed content

Implementation Details

  • Multi-instance Docusaurus docs plugins (one per version)
  • Custom navbar dropdown component with cross-version navigation that respects version-map redirects
  • Theme swizzling for DocItem wrapper, custom navbar components, and styling
  • Recursive sidebar parsing that handles nested categories and shorthand Docusaurus syntax
  • Automatic v2/ prefix stripping from doc IDs in v2 PR workflows

Testing

  • Build passes successfully with all features working
  • Version dropdown correctly routes between versions
  • Shorthand categories in sidebars properly discovered
  • v2 docs from existing PR workflow correctly integrated

- Migrate all existing docs to docs/v1/ for version 1 documentation
- Create docs/v2/ folder with new v2 beta docs (currently just index)
- Create docs/next/ folder for unreleased/development docs
- Implement docs-version-resolver plugin that creates smart unversioned URL routes
- Routes use layered resolution: explicit redirects → current version → fallback to stale
- Add VersionSelector navbar dropdown to switch between doc versions
- Add StaleBanner component showing on all non-current version pages
- Support sidebar-based doc discovery with nested category and shorthand syntax
- Extract v2 docs from sidebars.js '🚧 v2 beta docs' section with v2/ prefix stripping
- Create version-map.js for redirect configuration and version settings
- Update docusaurus.config.js with multi-instance docs plugins for versioning
- Theme swizzling: DocItem wrapper, NavbarItem components, and custom CSS

Co-Authored-By: Claude Haiku 4.5 <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.

1 participant