[Docs] Enabling Docusaurus versions#1312
Conversation
📝 WalkthroughWalkthroughUpdates the Docusaurus config to add docs versioning (sets Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This pull request partially implements documentation versioning for the Thunder project by configuring Docusaurus to support version management. The changes prepare the infrastructure for multi-version documentation but do not complete the full implementation described in the parent issue #1210.
Changes:
- Configured Docusaurus versioning with 'current' as the last version labeled as 'Next' accessible via
/nextpath - Added a version dropdown to the navbar for version navigation
- Commented out the
noIndexflag to allow search engine indexing
| // Versioning. | ||
| lastVersion: 'current', | ||
| versions: { | ||
| current: { | ||
| label: 'Next', | ||
| path: 'next', | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Per the parent issue #1210, the CI/CD configuration should be updated to:
- Release a new documentation version when doing a Thunder release
- Update the 'next' version when merging to main
However, this PR only updates the Docusaurus configuration without implementing the corresponding CI/CD automation. The existing .github/workflows/release-builder.yml and .github/workflows/nightly-build-validation.yml workflows deploy documentation but don't create versioned documentation snapshots.
Consider either:
- Implementing the CI/CD changes in this PR to fully address issue [Docs] Versioning support for Thunder Documentation #1210, or
- Creating a follow-up issue/PR for the CI/CD automation and documenting this limitation in the PR description
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
@copilot Create a follow-up issue/PR for the CI/CD automation and documenting this limitation in the PR description
| // Versioning. | ||
| lastVersion: 'current', | ||
| versions: { | ||
| current: { | ||
| label: 'Next', | ||
| path: 'next', | ||
| }, | ||
| }, |
There was a problem hiding this comment.
The versioning configuration is incomplete. According to Docusaurus best practices and the project's own documentation (docs/content/community/contributing/contributing-code/documentation-development/advanced-topics.mdx:405-413), enabling versioning requires creating actual versioned documentation files and a versions.json file using the pnpm docusaurus docs:version command.
Currently, only the configuration is added but no actual versioned documentation exists. This means:
- The version dropdown will appear but have no other versions to select
- No
versions.jsonfile exists to track versions - No
versioned_docs/orversioned_sidebars/directories exist
While it's acceptable to prepare the configuration in advance, consider adding a comment or documentation update explaining that actual versions will be created during release processes, or ensure the CI/CD workflow mentioned in issue #1210 is implemented to automatically create versions.
| // Versioning. | |
| lastVersion: 'current', | |
| versions: { | |
| current: { | |
| label: 'Next', | |
| path: 'next', | |
| }, | |
| }, | |
| // Note: Docusaurus docs versioning is intentionally not enabled yet. | |
| // Actual versions and the versions.json file will be created during the | |
| // release process using `pnpm docusaurus docs:version` once the | |
| // versioning workflow is in place. Until then, the docs run in | |
| // single-version mode to avoid an incomplete version dropdown. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1312 +/- ##
=======================================
Coverage 89.92% 89.92%
=======================================
Files 625 625
Lines 40662 40662
Branches 2371 2371
=======================================
Hits 36566 36566
Misses 2217 2217
Partials 1879 1879
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Parent issue
This pull request updates the Docusaurus documentation site configuration to enable versioning and prepare for public access. The main changes focus on introducing documentation version management and updating navigation elements.
Documentation versioning:
lastVersionto'current'and defining aversionsobject with a labeled'Next'version indocs/docusaurus.config.ts.docs/docusaurus.config.ts.Site indexing:
noIndexflag, which previously prevented search engines from indexing the site, signaling readiness for public access indocs/docusaurus.config.ts.Summary by CodeRabbit