You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that relative links, like the one to NoUnused.Variables, which links to ./NoUnused-Variables do not direct to the same location when the current URL has a trailing slash and hasn't.
With the URL.
Thoughts
Maybe relative links from the README are not a good idea, since they do not redirect to the correct page when reading the README on GitHub either. I have searched for other packages that link to their modules, and could only find rtfeldman/elm-css and elm-explorations/test which have an absolute path to the packages website, containing /latest/. I don't think is great either, because you are potentially redirecting users to a different version of the package (which may or may not have the functions linked to).
That said, I think adding a trailing slash to the url when the page loads solves the problem.
I noticed this because in other packages, I linked to this package with the URL not having a trailing slash. The problem does not occur when finding a package from the packages search page.
In the meantime, I have added a trailing slash to my links to the packages.
The text was updated successfully, but these errors were encountered:
Problem: Relative links in the README break when URL doesn't have a trailing slash
SSCCE
Does not work:
NoUnused.Variables
linkWorks:
NoUnused.Variables
linkDescription
It seems that relative links, like the one to
NoUnused.Variables
, which links to./NoUnused-Variables
do not direct to the same location when the current URL has a trailing slash and hasn't.With the URL.
Thoughts
Maybe relative links from the README are not a good idea, since they do not redirect to the correct page when reading the README on GitHub either. I have searched for other packages that link to their modules, and could only find rtfeldman/elm-css and elm-explorations/test which have an absolute path to the packages website, containing
/latest/
. I don't think is great either, because you are potentially redirecting users to a different version of the package (which may or may not have the functions linked to).That said, I think adding a trailing slash to the url when the page loads solves the problem.
I noticed this because in other packages, I linked to this package with the URL not having a trailing slash. The problem does not occur when finding a package from the packages search page.
In the meantime, I have added a trailing slash to my links to the packages.
The text was updated successfully, but these errors were encountered: