moonlight-stream / moonlight-stream/moonlight-stream.github.io
#enhancement Add redirect links for documentation
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 64
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the site's current structure and the proposed docs directory, then identify which GitHub wiki links should receive redirect pages. Use the /docs/setup example and its fallback URL as the reference, and consider the work done when the intended links redirect correctly while retaining a non-JavaScript fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100