From 9eead7468c60b2b5b1c648bb0543ab287af40e0b Mon Sep 17 00:00:00 2001 From: yudhi Date: Mon, 27 Jul 2026 17:32:02 +0700 Subject: [PATCH] ci: don't clear HTML redirects when building translations Building a translation exported MDBOOK_OUTPUT__HTML__REDIRECT='{}', which wiped the redirect table and made renamed or removed pages 404 in every non-English book. Clearing the redirects is no longer needed because book.toml is restored for each translation, so mdbook now emits the same redirect pages as the English build. Closes #2022. --- .github/workflows/build.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 5c132572520f..8f03003cf731 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -33,10 +33,8 @@ else sed -i '/curly-quotes/d' book.toml # Set language and adjust site URL. - # TODO: Clearing the redirects is no longer necessary since we restore book.toml. export MDBOOK_BOOK__LANGUAGE=$book_lang export MDBOOK_OUTPUT__HTML__SITE_URL=/comprehensive-rust/$book_lang/ - export MDBOOK_OUTPUT__HTML__REDIRECT='{}' # Include language-specific Pandoc configuration if [ -f ".github/pandoc/$book_lang.yaml" ]; then