-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Inbound links to specific git version docs broken, should at least redirect to the closest version #1927
Comments
That should be the most feasible, even if it will blow up the number of generated files. The necessary change would need to be made here
This is an interesting idea; It would seem that Javascript could be used ( const match = window.location.pathname.match(/^(.*\/docs\/[^/]*)\/[0-9.]*$/)
if (match) window.location.replace(match[1] + window.location.search + window.location.hash) If you want something more sophisticated than to redirect to the newest version, you could play games with AJAX [EDIT]: That Javascript code would need to be added to this file: https://github.com/git/git-scm.com/blob/gh-pages/content/404.html |
Another option:
|
Please notice that git-scm.com is hosted on GitHub Pages. |
Understood. Then I assume your implementation for option 2 would generate an HTML page for each redirecting URL with a
Couldn't the |
Yep, and that's a problem. It's already a lot of files.
No, it would be an automatic redirect too fast for the reader to have a chance to read it.
Not unless you want to balloon the number of |
@vassudanagunta have a look at #1928. You can see the effect e.g. at https://dscho.github.io/git-scm.com/docs/diff-options/2.15.0. |
First, I think the more helpful 404 in #1928 is great! 🎉 I'm not pressing you to do more! :) That said,
Maybe that's not really a big deal? I don't know, just wondering.
I wonder, what if you added JS logic to the new 404 to autoredirect to the page it suggests, after a delay of 10 secs? Something to consider after what you just coded sits a while. It's too bad you can't get analytics for GitHub Pages, to see how often this happens, without adding third party tracking. Should I close this now or wait for #1928 to be deployed? |
Thanks.
Well, you could always start working on this yourself. That's kind of what I have expected already.
Have a look at the deploy times. Maybe, hopefully, that will make you rethink that statement.
The entire proposal is based on the idea to let JavaScript do the redirection. JavaScript cannot use that
Here is something else to consider while the code sits for a while: How about actually getting active and not let other people do all the coding? Just an idea. (The idea behind open source.)
It is really too bad. However, I fail to see how that would benefit us in this particular scenario.
It is already set to autoclose when the PR is merged. No need to do that manually. |
People used to link to specific versions of manual pages (as reported in #1927). Instead of showing a plain 404 page, try to be slightly more helpful by telling the reader that this version no longer exists, providing a link to the newest version. Then, also try to figure out what the most closely-matching page is that _is_ available, and if one is found, show that one, too. Signed-off-by: Johannes Schindelin <[email protected]>
You made some assumptions there. I quit my corporate job 11 years ago and write (prose) and do software dev that i will release as open source, and do volunteer work. All my work now is toward social good. I live on less than 15k a year. I used to make 6 figures. :) |
I did really not assume anything here. Instead, I observed that you had not written even a single line of code, but instead suggested changes that could not work which would be obvious to anybody who had looked at the code. |
URL for broken page
https://git-scm.com/docs/diff-options/2.15.0
Problem
This page was linked to by a StackOverflow answer and recently reported dead.
I can see why git-scm.com/docs would not want to have every patch release in the dropdown on that page, but dead links are bad for the internet, and should be avoided when possible, at the very least by a reasonable redirect.
Alternatives:
docs/diff-options/2.15.0
would redirect todocs/diff-options/2.15.4
The text was updated successfully, but these errors were encountered: