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

#enhancement Add redirect links for documentation #16

Open
jorys-paulin opened this issue Jan 18, 2019 · 0 comments
Open

#enhancement Add redirect links for documentation #16

jorys-paulin opened this issue Jan 18, 2019 · 0 comments

Comments

@jorys-paulin
Copy link
Contributor

Currently, all links shown to the user redirecting them to the GitHub wiki are direct links, meaning if the wiki link changes, the user will get a 404 if they don't have an updated version of Moonlight with the new, working link.

Adding redirect links to moonlight-stream.org can allow maintainers to have a permalink whose redirect target can be changed if the wiki moves to another domain or URL without changing all corresponding links in all Moonlight versions.

Here's an example. Instead of showing: https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide#streaming-over-the-internet, the link would be like https://moonlight-stream.org/docs/setup#internet, making the link shorter and allowing the target URL to change in the future.

Apart from redirecting, the redirecting pages could in the future be switched to static pages, if for example, the wiki moves from GitHub wiki to this repository, though it's only a possibility.

How to implement this is quite simple, even for GitHub pages, which is only a static server: for each link, let's say /docs/setup, we create setup.html inside the docs directory, containing the following:

<!--Insert basic HTML structure here-->

<!--This will show a fallback link if javascript isn't enabled-->
Redirecting you. If this doesn't work, <a href="https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide">click here</a>
<script>
  // This will ask the browser to redirect the user to that page, and remove this one from browsing history
  window.location.replace("https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide");
</script>

<!--Insert basic HTML structure here-->

I think this will benifit the project in the long run, but before making a pull request I wanted to know if you have anything to say about it, or more ideas.

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

1 participant