Skip to content
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

Relative links in the README break when URL doesn't have a trailing slash #313

Open
jfmengels opened this issue Sep 18, 2019 · 1 comment

Comments

@jfmengels
Copy link

Problem: Relative links in the README break when URL doesn't have a trailing slash

SSCCE

Does not work:

Works:

Description

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.

@jfmengels
Copy link
Author

jfmengels commented Oct 2, 2019

Just FYI, I noticed this problem with the links in Ellie and elm-search. I have opened issues there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant