-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: versioned docs dropdown #3226
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3226 +/- ##
=======================================
Coverage 51.40% 51.40%
=======================================
Files 288 288
Lines 26108 26108
=======================================
Hits 13421 13421
Misses 11961 11961
Partials 726 726 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Faeka Ansari <[email protected]>
Signed-off-by: Faeka Ansari <[email protected]>
Signed-off-by: Faeka Ansari <[email protected]>
605f72b
to
fb61a6b
Compare
I see that this is based on what @rpelczar had linked you to, but this process is frankly much too onerous and prone to human error. It doesn't satisfy this requirement that I included in #3171:
This would introduce no new complications or process changes. Edit: I had been under the impression that Docusaurus had built-in support for that approach, but it appears not. It's possible that a plugin exists for this. If not, I think this would be a very easy plugin to write. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
I looked for one and didn't find one. It doesn't mean it's not our there somewhere. Rolling our own is really not too bad. It could probably be as simple as:
After this is working to our satisfaction in main, we'd backport it to release-1.1 and release-1.0. |
I do not have access to Netlify, which made it tough for me to understand how the separate release doc is being built and deployed to their respective subdomains. I’ve noticed that this pattern of subdomain-based doc only works for some versions, which reinforces the inconsistencies in the deployment process. like, while https://release-1-1.docs.kargo.io works, https://release-1-0.docs.kargo.io does not. seems not every version has been built and deployed to its subdomain, and I may need access to Netlify to run the build process for each missing versions. Hence, i opted to work directly with Rafal’s suggestion, it simplifies the process by treating each release as a separate static site with its subdomain. I will start working on the custom plugin that could detect the current doc version, fetch available versions from github and provide a dropdown (with doc redirection) for users to switch between versions |
@fykaa don't get caught up in building or deploying docs. Please just assume that for every branch release-x-y with x > 1, the subdomain will exist. If one of them does not, I can fix it. The reason that the 1.0 docs don't currently exist has to do with the migration we did from docs.kargo.akuity.io to docs.kargo.io. iirc, there were some changes related to the domain change that didn't get backported that far, so I just didn't deploy them. I'll investigate and fix it. |
It was dumber than that. Something just got stuck on their end during the migration. Should be all set now. All of the following exist:
|
closes #3171
This pull request implements a version dropdown in the Docusaurus configuration (
docusaurus.config.js
) to support versioned documentation. The following changes were made:Added version dropdown to Navbar:
docusaurus.config.js
to include adocsVersionDropdown
in the navbar letting users to switch between different doc versionsVersioned doc creation:
npm run docusaurus docs:version <version>
for each version (1.0
,1.1
) to generate versioned docs.versions.json
file to include the new versions.Next Steps: update release procedure
npm run docusaurus docs:version <version>
should be added to the release procedures