-
Notifications
You must be signed in to change notification settings - Fork 129
fix: Absolute URL md links #1959
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
base: master
Are you sure you want to change the base?
Conversation
Preview for this PR was built for commit |
1 similar comment
Preview for this PR was built for commit |
Preview for this PR was built for commit |
Preview for this PR was built for commit |
Preview for this PR was built for commit |
1 similar comment
Preview for this PR was built for commit |
…/alternate-absolute
Preview for this PR was built for commit |
Preview for this PR was built for commit |
Preview for this PR was built for commit |
Preview for this PR was built for commit |
…/alternate-absolute
Preview for this PR was built for commit |
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.
When I go to https://pr-1959.preview.docs.apify.com/api.md I still see
Isn't it supposed to link to /academy.md
instead of just /academy
?
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Comment @cursor review
or bugbot run
to trigger another review on this PR
|
||
const parsedUrl = parse(node.url); | ||
const isUrlInternal = isInternal(parsedUrl, config.absoluteUrl); | ||
const url = isUrlInternal ? `${config.absoluteUrl}${parsedUrl.pathname}.md` : node.url; |
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.
Bug: URL Handling and Link Classification Issues
The isInternal
function receives config.absoluteUrl
(a full URL) instead of just a hostname, causing all internal links to be incorrectly classified as external. Additionally, internal URLs are unconditionally appended with .md
, which can break links to non-markdown resources.
Preview for this PR was built for commit |
Preview for this PR was built for commit |
Closes #1886
Removed invalid links: