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

A more helpful 404 page #1928

Merged
merged 4 commits into from
Dec 7, 2024
Merged

A more helpful 404 page #1928

merged 4 commits into from
Dec 7, 2024

Conversation

dscho
Copy link
Member

@dscho dscho commented Dec 7, 2024

Changes

  • Changes the 404 page so that non-existing docs/ and book/ links redirect to pages that might still be helpful to the reader.

Context

It was pointed out in #1927 that it is relatively easy to end up with hyperlinks out there in the wild, wild web, that point to outdated manual page versions.

This is an attempt to show more helpful pages in such scenarios.

dscho added 3 commits December 7, 2024 00:41
People used to link to specific versions of manual pages (as reported in
git#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]>
It is theoretically possible that a Git command no longer exists and
therefore is no longer documented, either, yet there are links out there
pointing to said documentation.

Let's try to be somewhat helpful by detecting that situation and
directing the reader to the top-level documentation page.

Signed-off-by: Johannes Schindelin <[email protected]>
Just like was just done for non-existing documentation pages, let's be
more helpful for missing book pages, too.

Signed-off-by: Johannes Schindelin <[email protected]>
content/404.html Outdated Show resolved Hide resolved
Co-authored-by: Loymdayddaud <[email protected]>
Copy link
Contributor

@TheGiraffe3 TheGiraffe3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, though I haven't done HTML for a while. No more typos. (not approving because apparently I don't have access to)

@dscho
Copy link
Member Author

dscho commented Dec 7, 2024

Looks good to me, though I haven't done HTML for a while. No more typos. (not approving because apparently I don't have access to)

Thank you!!!

@dscho dscho merged commit e7e45c2 into git:gh-pages Dec 7, 2024
1 check passed
@dscho dscho deleted the more-helpful-404 branch December 7, 2024 16:58
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

Successfully merging this pull request may close these issues.

Inbound links to specific git version docs broken, should at least redirect to the closest version
2 participants