-
Notifications
You must be signed in to change notification settings - Fork 183
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
[BUG] Link checker fails when adding relative URLs #538
Comments
I think the problem is not with link checker. We have a copy of README.md in docs/source. That is causing problem when relative path is given. |
Oh! It's a soft link too, not a copy! |
@Krish-2505 add a relative link to any doc and submit a draft PR, it should fail. |
@dblock I attempted to include a relative link, but the link checker did not detect any failures. it detected failures when I added a link that didn't exist. |
@dblock In the file DEVELOPER_GUIDE.md, the link highlighted in yellow does not exist, and the link checker is failing because of this non-existent link. However, the link checker is not failing for the other relative links that were added to any doc. |
I don't see a relative link in your draft PR (#758), show me a passing link checker on a relative link? |
@dblock Here I added one relative link in readme.md in the forked repo and created a pull request, link checker didn't fail here |
@Krish-2505 can you please post a link to this change, not a screenshot? |
@Krish-2505 That's not a relative link.
A relative link to
|
@dblock The link checker is encountering an issue when adding relative links to the README.md file. It seems that the link checker is resolving the relative links incorrectly due to the presence of a soft copy of the README.md file in the docs/source directory. |
Yes, this is the problem that needs fixing as pointed out by @saimedhi in #538 (comment). |
@dblock I've made modifications to the links.yml workflow file to address the issue with relative links in the README.md. Here's a summary of the changes: Added a new step before the link checking process. This step removes the symbolic link (soft link) of README.md in the docs/source directory. This prevents the link checker from incorrectly resolving relative links due to the presence of this soft copy. In the arguments section of the lychee Link Checker, I've added an exclusion for the file reference to the docs/source/README.md. This exclusion is necessary because even though we've removed the soft link, other parts of the project or external references might still point to this location. By excluding it from the link check, we ensure that the checker doesn't attempt to validate any links that might reference this now-nonexistent soft link. This prevents potential false positives or errors that could arise from references to the removed soft link. After the link checking is complete, I've added another step to recreate the soft link. This ensures that the repository structure remains intact and doesn't affect other workflows that might depend on the presence of this soft link. After making these change link checker is working as Expected. Check out this pr(Krish-2505#5). links.yml(https://github.com/Krish-2505/opensearch-py/edit/main/.github/workflows/links.yml) |
@Krish-2505 Make a PR into this project and I can take a look? |
What is the bug?
Coming from https://github.com/opensearch-project/opensearch-py/pull/537/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 the link checker does not like
[page](link)
when link is a relative link to source code. These work on GitHub.How can one reproduce the bug?
What is the expected behavior?
The text was updated successfully, but these errors were encountered: