dvc.org: broken external links at community tutorials page
At https://dvc.org/doc/tutorials/community you see all the links are pointing to dvc site and 404 although content/docs/tutorials/community.md
is featuring proper external links.
Tried investigating root cause, might be something in redirects-list.json & src/utils/shared/redirects.js
Also, not 100% relevant (and sure 😃), but in gatsby-config both external-link-plugin
& gatsby-remark-external-links
are used which might be doing similar things
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (17 by maintainers)
@shcheklein I forgot to add domain check to click handler… Here is another fix
@jorgeorpinel I made PR with fix, could you review it
@jorgeorpinel not sure it’s broken the same way in develop & build mode, but
This is happening for
/
Because of redirect rule being applied and returning only relative part of URLDetails:
<Link>
component is callinggetRedirect
here and this “^/(.+)/$” pattern is being checked againstpath
part of external URLs omitting the host, returning relative urls that are being rendered instead of original external url.So as a quickfix, can just remove trailing
/
from external links to avoid this and might need to modify redirect matching/using results logic