code-compareDocumentation Versioning

Guide to managing documentation versions with mike

Managing documentation versions across releases using mike


Overview

NeurosLink AI documentation uses mikearrow-up-right to maintain multiple versions of documentation for different releases. This allows users to view documentation for the specific version they're using.

Benefits

  • Version-specific docs: Users can view docs matching their installed version

  • Preserved history: Old versions remain accessible

  • Easy switching: Version selector in navigation

  • Automated deployment: Integrate with CI/CD for automatic publishing


Setup

1. Install Dependencies

# Install mike (already in requirements.txt)
pip install -r requirements.txt

2. Verify Configuration

The mkdocs.yml already includes mike configuration:


Local Usage

Create First Version

Deploy New Version

List All Versions

Output:

Serve Versioned Docs Locally

Visit http://localhost:8000 to test version switching.

Delete a Version


Version Management Workflow

For Minor Releases (1.0 → 1.1)

For Major Releases (1.x → 2.0)

For Patch Releases (1.0.0 → 1.0.1)


CI/CD Integration

GitHub Actions Workflow

Create .github/workflows/docs.yml:

Automatic Version Detection


Best Practices

1. Version Naming

  • Stable releases: 1.0, 1.1, 2.0 (match npm version)

  • Pre-releases: 1.0-beta, 2.0-rc1

  • Development: dev (always latest from main branch)

2. Alias Strategy

3. Version Cleanup

4. Documentation Updates

For bug fixes to old versions:


Advanced Configuration

Custom Version Selector

Add to mkdocs.yml:

Version Warnings

Add version-specific warnings in docs/index.md:


Troubleshooting

Issue: "gh-pages branch not found"

Issue: Version selector not appearing

Verify mike is installed:

Check mkdocs.yml configuration:

Issue: Wrong default version


Version History

Version
Release Date
Status
Notes

7.47.x

Current

✅ Active

Latest features

7.46.x

2024-12

✅ Active

Previous stable

7.45.x

2024-11

⚠️ Old

Security updates only

< 7.45

2024 and earlier

❌ Unsupported

Upgrade recommended



Additional Resources

Last updated

Was this helpful?