Skip to content

Conversation

@dscho
Copy link
Member

@dscho dscho commented Sep 26, 2024

Changes

This makes the following URLs redirect to the respective book front pages:

Context

By mistake, I typed in one of those URLs and was surprised to be redirected to the 404 page. Easy fix.

@dscho dscho self-assigned this Sep 26, 2024
@dscho dscho marked this pull request as draft September 26, 2024 13:10
@dscho dscho force-pushed the book-redirects branch 2 times, most recently from cd4a670 to 5efd2fd Compare September 26, 2024 14:06
Instead of 404'ing, this URL should redirect to
https://git-scm.com/book/en/v2 automatically, similarly the
intermediate URL https://git-scm.com/book/en/.

Analogous redirects are also needed for the translated versions of the
book.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
I just fixed the `update-book2.rb` script so that URLs like
https://git-scm.com/book/ (with a trailing slash) redirect again; This
commit reflects the impact on the automatically rendered content files
in `external/book/`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
There is already code to handle the top-level URL correctly. However,
URLs like http://localhost:5000/book/ still weren't handled by appending
`index.html`. Let's fix this.

This is needed because we are _just_ about to add tests to verify that
the book redirects at URLs like https://git-scm.com/book/ work.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Now that `external/book/` has been re-generated, we can safely verify in
the CI builds that these redirects keep working.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho marked this pull request as ready for review September 26, 2024 14:18
Copy link
Member

@ttaylorr ttaylorr left a comment

Choose a reason for hiding this comment

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

❤️ thanks for fixing!

@ttaylorr ttaylorr merged commit 8494c7f into git:gh-pages Sep 26, 2024
1 check passed
@dscho dscho deleted the book-redirects branch September 26, 2024 15:18
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.

2 participants