-
Notifications
You must be signed in to change notification settings - Fork 304
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
Link checker fails internal links #1046
Comments
We had to slightly tweak the link checker before to resolve internal links (see this change).
|
Hmm, I have no idea why this isn't working. I confirmed with a
or even with
But then later the link checker complains that
It's as if the markdown link checker can't see the files generated by the previous steps, but that shouldn't be.... |
This is in fact the same issue that is reported here: tcort/markdown-link-check#96 (but it doesn't provide much information that we don't know already) |
I'm currently out of ideas @graeme-a-stewart What we could do as a non-perfect solution is to use the replacement pattern to prefix |
Just spitballing here, would it help if instead of "pattern": "^\\s*{{\\s*site.baseurl\\s*}}/(.*)",
"replacement": "/_site/$1" we made it a relative path, viz. "pattern": "^\\s*{{\\s*site.baseurl\\s*}}/(.*)",
"replacement": "./_site/$1" |
Nope, that also doesn't work:
In fact, it looks like the link checker actually changes directories to the current file. |
Thanks @klieret. So do we need to construct the full absolute path then? Slipping a |
The thing is, I already tried with full absolute paths (it's static, so we can just had code it) and it failed as well. That's what's confusing me. I just tried with a local installation of Let me try again on the gh action |
No, absolute paths don't work either. Reproduced my previous comment again. |
This is only a half-hearted fix: It will fail if you create a new page and link to it before it is published. See #1046 for more information.
* Fix link checker for most cases This is only a half-hearted fix: It will fail if you create a new page and link to it before it is published. See #1046 for more information.
(Though linked to this issue, the merged PR is only a partial fix, so I'm keeping this open) |
Isn't this issue solved now? |
There should still be one loophole, though it doesn't seem to come up often in practice:
(from my notes to #1051) |
Note that this edge case is not triggered by e.g., new GSoC pages, because there the interlinking (to project/organization etc.) is generated from the yaml frontmatter, so the markdown link checker doesn't find anything to check. |
Though looking at this again, I wonder if we could use absolute local paths for the replacement and then set |
I want to contribute to this issue .please assign me if have seen this then let me know |
The link checker fails all links in recent PRs, see e.g. #1045 👍
The text was updated successfully, but these errors were encountered: