-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix: Make docs links passthrough #1085
base: main
Are you sure you want to change the base?
Conversation
@@ -39,6 +39,8 @@ | |||
# options for sphinx_autodoc_typehints | |||
always_use_bars_union = True | |||
|
|||
myst_all_links_external = True |
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.
I think instead of this we should add a URL scheme for absolute paths. See docs. I think we could just add '/'
as a scheme to match any URL starting with a slash and effectively skip checking all absolute URLs without skipping checking internal URLs
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.
Nevermind that might require a colon like /:path
to work. The other option would be we add a custom scheme like dh:
to prefix external links and start failing on myst failures. Probably should so we don't have bad links internally
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.
I did consider a custom scheme but seemed a bit annoying to have to keep track of if it can be avoided. But if we want to do that as a way to validate I'd be fine with it.
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.
Ya it's a hard pick because salmon doesn't rewrite any absolute links. So absolute links can't be to actual pages within the project because they won't work on salmon. /components/button.md
would resolve to deephaven.io/components/button
which won't exist.
In my ideal scenario absolute links always fail and require the schema. But it didn't look like myst worked that way and I'm not sure it's worth the effort it might take to enforce that.
I'd still prefer internal links be validated. We have broken links in the current docs I think, but they don't fail doc builds. They should fail doc builds
Fixes https://deephaven.atlassian.net/browse/DOC-355 by "making all links external", meaning they are passthrough instead of being processed by myst parser. In particular the absolute paths were considered invalid because they were file locations that didn't exist at build time.