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

Replace www links with / #66

Open
eksperimental opened this issue Jan 19, 2022 · 4 comments
Open

Replace www links with / #66

eksperimental opened this issue Jan 19, 2022 · 4 comments

Comments

@eksperimental
Copy link
Contributor

Speaking of links, one things that I have had on my todo list is to change any links that point to www.erlang.org to instead point to / if they are not to be redirected in _redirects. This would allow the broken link checker to check those links as well just to make sure that they remain.

Originally posted by @garazdawi in #61 (review)

@eksperimental
Copy link
Contributor Author

These are the contents of _redirects

## Redirects to erlang.org
/download/*         https://erlang.org/download/:splat
/~*                 https://erlang.org/~:splat
/course/*           https://erlang.org/course/:splat
/documentation/*    https://erlang.org/documentation/:splat
/mailman/*          https://erlang.org/mailman/:splat
/mailman-icons/*    https://erlang.org/mailman-icons/:splat
/pipermail/*        https://erlang.org/pipermail/:splat

## Old removed URLs
/doc/search         /doc
/docs/versions      /documentation
/rss/news/*           /news.xml
/erlang-enhancement-proposals/home.html /eeps/
/erlang-enhancement-proposals/* /eeps/:splat

## Redirects from old sites
https://blog.erlang.org/feed.xml https://www.erlang.org/blog.xml 301!
https://blog.erlang.org/*        https://www.erlang.org/blog/:splat 301!
https://bugs.erlang.org/browse/* https://www.erlang.org/bugs/:splat 301!
https://bugs.erlang.org/*        https://github.com/erlang/otp/issues 301!

So what should we do?

@garazdawi
Copy link
Contributor

This is an example of such a link, as it does not do any redirect: https://github.com/erlang/erlang-org/blob/master/_news/149.md?plain=1#L24

However, we do not want this type of link to be changed:

https://github.com/erlang/erlang-org/blob/master/_news/145.md?plain=1#L22-L26

as they are caught by the redirect.

I would expect that almost all of the links we want to rewrite point to https://www.erlang.org/doc/, but there might be other as well.

@eksperimental
Copy link
Contributor Author

What I will do is replace now that the links are standardized , replace https://www.erlang.org/ with /

when go over the redirect rules and find (/download|/course) etc and prefix them with https://erlang.org that way we are explicit as when we redirect out of the site. WDYT?

So in other words, do no rely on _redirect rules for links within the site, and only leave those rules from incoming links from the outside

@eksperimental
Copy link
Contributor Author

Once done we can run a link checker throughout the site and find broken links and fix them manually.

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

No branches or pull requests

2 participants