docs: ApiLink generates correct URL for versioned docs#1870
Merged
Conversation
Agent-Logs-Url: https://github.com/apify/crawlee-python/sessions/cd7995a3-b181-460c-9883-54135d42f52f Co-authored-by: barjin <61918049+barjin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] fix: ApiLink generates correct URL for versioned docs
fix: ApiLink generates correct URL for versioned docs
May 5, 2026
ApiLink generates correct URL for versioned docs
barjin
approved these changes
May 5, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1870 +/- ##
=======================================
Coverage 92.53% 92.53%
=======================================
Files 158 158
Lines 11078 11078
=======================================
Hits 10251 10251
Misses 827 827
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:
|
vdusek
approved these changes
May 5, 2026
Collaborator
vdusek
left a comment
There was a problem hiding this comment.
thanks, and do it also for SDK and client please
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ApiLinkalways resolved to/api/<ClassName>regardless of the active Docusaurus version, causing broken-link CI failures for PRs that introduce new public classes (which only exist in the unreleasednextAPI docs).Changes
website/src/components/ApiLink.jsx/api/${to}link with version-aware routing usinguseDocsVersion(mirrors the approach in the JS Crawlee sister project)@docusaurus/theme-common/internal→@docusaurus/plugin-content-docs/client(correct Docusaurus 3.x API)version.isLast) →/api/${to}current/unreleased version →/api/next/${to}/api/${version}/${to}Issues
Testing
Verified routing logic covers all version states. No unit test infrastructure exists for the website components.
Checklist