From 96bc6ed33d12e04d5554fad659476dde205392f2 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 6 Jul 2025 12:47:58 +0200 Subject: [PATCH 1/4] Update Hugo and Pagefind to their respective latest versions This fixes https://github.com/git/git-scm.com/issues/1995. Signed-off-by: Johannes Schindelin --- hugo.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hugo.yml b/hugo.yml index 90e26b39a8..1ad52c1862 100644 --- a/hugo.yml +++ b/hugo.yml @@ -31,8 +31,8 @@ module: - source: external/docs/content target: content params: - hugo_version: 0.139.4 - pagefind_version: 1.1.1 + hugo_version: 0.148.2 + pagefind_version: 1.3.0 latest_version: 2.50.1 latest_relnote_url: https://raw.github.com/git/git/master/Documentation/RelNotes/2.50.1.adoc latest_release_date: '2025-06-16' From e9be74ae40884221d20316eb1807474cdf436446 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 30 Jul 2025 20:15:19 +0200 Subject: [PATCH 2/4] Add a script to upgrade Hugo locally to the recorded version This script currently only works on Linux. If need be, it can be extended to cover other operating systems. That will be the responsibility of people who want that support, though. Signed-off-by: Johannes Schindelin --- script/upgrade-hugo.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 script/upgrade-hugo.sh diff --git a/script/upgrade-hugo.sh b/script/upgrade-hugo.sh new file mode 100755 index 0000000000..92a395fab8 --- /dev/null +++ b/script/upgrade-hugo.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +die() { + echo "$*" >&2 + exit 1 +} + +HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' &2 + +download_url=https://github.com/gohugoio/hugo/releases/download && +curl -Lo /tmp/hugo.deb $download_url/v$HUGO_VERSION/hugo_extended_${HUGO_VERSION}_linux-amd64.deb && +sudo dpkg -i /tmp/hugo.deb || +die "Failed to install Hugo version $HUGO_VERSION" \ No newline at end of file From 2b148b8486a03620be02f49440c9a51bdd8079e0 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 31 Jul 2025 03:35:29 +0200 Subject: [PATCH 3/4] content: add explicit redirects for "ugly" URLs of `list` files As of v0.148.0, Hugo no longer generates `.html` files for `/_index.html` files; For full details, see https://discourse.gohugo.io/t/breaking-changes-in-v0-148-0/55257. That means that e.g. `book.html` is now missing, and only `book/index.html` is present (but we want both so that either https://git-scm.com/book or https://git-scm.com/book/ are fine). Therefore, we need to add explicit aliases to get those `.html` files back after upgrading to Hugo v0.148.0. Note that this commit includes changes to the (generated) `book/` files. This is intentional; The next commit will adjust the script that generates those files. Signed-off-by: Johannes Schindelin --- content/blog/_index.html | 3 +++ content/downloads/_index.html | 2 ++ content/downloads/guis/_index.html | 2 ++ content/videos/_index.html | 2 ++ external/book/content/book/az/v2/_index.html | 2 ++ external/book/content/book/be/v2/_index.html | 2 ++ external/book/content/book/bg/v2/_index.html | 2 ++ external/book/content/book/cs/v2/_index.html | 2 ++ external/book/content/book/de/v2/_index.html | 2 ++ external/book/content/book/en/v2/_index.html | 4 ++++ external/book/content/book/es/v2/_index.html | 2 ++ external/book/content/book/fa/v2/_index.html | 2 ++ external/book/content/book/fr/v2/_index.html | 2 ++ external/book/content/book/gr/v2/_index.html | 2 ++ external/book/content/book/id/v2/_index.html | 2 ++ external/book/content/book/it/v2/_index.html | 2 ++ external/book/content/book/ja/v2/_index.html | 2 ++ external/book/content/book/ko/v2/_index.html | 2 ++ external/book/content/book/mk/v2/_index.html | 2 ++ external/book/content/book/ms/v2/_index.html | 2 ++ external/book/content/book/nl/v2/_index.html | 2 ++ external/book/content/book/pl/v2/_index.html | 2 ++ external/book/content/book/pt-br/v2/_index.html | 2 ++ external/book/content/book/pt-pt/v2/_index.html | 2 ++ external/book/content/book/ru/v2/_index.html | 2 ++ external/book/content/book/sl/v2/_index.html | 2 ++ external/book/content/book/sr/v2/_index.html | 2 ++ external/book/content/book/sv/v2/_index.html | 2 ++ external/book/content/book/tl/v2/_index.html | 2 ++ external/book/content/book/tr/v2/_index.html | 2 ++ external/book/content/book/uk/v2/_index.html | 2 ++ external/book/content/book/uz/v2/_index.html | 2 ++ external/book/content/book/zh-tw/v2/_index.html | 2 ++ external/book/content/book/zh/v2/_index.html | 2 ++ 34 files changed, 71 insertions(+) diff --git a/content/blog/_index.html b/content/blog/_index.html index 28bbd6519e..10c6db9fa0 100644 --- a/content/blog/_index.html +++ b/content/blog/_index.html @@ -3,6 +3,9 @@ section: "blog" layout: "default" sidebar: "blog" +url: /blog.html +aliases: +- /blog/index.html ---
diff --git a/content/downloads/_index.html b/content/downloads/_index.html index f683cb51db..8875f32233 100644 --- a/content/downloads/_index.html +++ b/content/downloads/_index.html @@ -4,6 +4,8 @@ url: /downloads.html aliases: - /downloads/index.html +- /download/index.html +- /download.html ---
diff --git a/content/downloads/guis/_index.html b/content/downloads/guis/_index.html index 9ae43426c8..5c2be871ae 100644 --- a/content/downloads/guis/_index.html +++ b/content/downloads/guis/_index.html @@ -7,6 +7,8 @@ - /downloads/guis/index.html - /download/guis/index.html - /download/guis.html +- /download/gui/index.html +- /download/gui.html ---
diff --git a/content/videos/_index.html b/content/videos/_index.html index d5b1b7ee1b..78d4e1447a 100644 --- a/content/videos/_index.html +++ b/content/videos/_index.html @@ -5,6 +5,8 @@ url: /videos.html aliases: - /videos/index.html +- /video/index.html +- /video.html ---
diff --git a/external/book/content/book/az/v2/_index.html b/external/book/content/book/az/v2/_index.html index 5069bcfb09..89f040f7d3 100644 --- a/external/book/content/book/az/v2/_index.html +++ b/external/book/content/book/az/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/az/v2/index.html" - "/book/az/v1/index.html" +- "/book/az/v1.html" - "/book/az/index.html" +- "/book/az.html" --- diff --git a/external/book/content/book/be/v2/_index.html b/external/book/content/book/be/v2/_index.html index b866ca6cb6..f57d2fd9d0 100644 --- a/external/book/content/book/be/v2/_index.html +++ b/external/book/content/book/be/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/be/v2/index.html" - "/book/be/v1/index.html" +- "/book/be/v1.html" - "/book/be/index.html" +- "/book/be.html" --- diff --git a/external/book/content/book/bg/v2/_index.html b/external/book/content/book/bg/v2/_index.html index 8b21d06b8b..8fa3602564 100644 --- a/external/book/content/book/bg/v2/_index.html +++ b/external/book/content/book/bg/v2/_index.html @@ -17,5 +17,7 @@ aliases: - "/book/bg/v2/index.html" - "/book/bg/v1/index.html" +- "/book/bg/v1.html" - "/book/bg/index.html" +- "/book/bg.html" --- diff --git a/external/book/content/book/cs/v2/_index.html b/external/book/content/book/cs/v2/_index.html index c6e7897553..168fd16f45 100644 --- a/external/book/content/book/cs/v2/_index.html +++ b/external/book/content/book/cs/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/cs/v2/index.html" - "/book/cs/v1/index.html" +- "/book/cs/v1.html" - "/book/cs/index.html" +- "/book/cs.html" --- diff --git a/external/book/content/book/de/v2/_index.html b/external/book/content/book/de/v2/_index.html index 42074a7ac7..417acf6ab1 100644 --- a/external/book/content/book/de/v2/_index.html +++ b/external/book/content/book/de/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/de/v2/index.html" - "/book/de/v1/index.html" +- "/book/de/v1.html" - "/book/de/index.html" +- "/book/de.html" --- diff --git a/external/book/content/book/en/v2/_index.html b/external/book/content/book/en/v2/_index.html index 1d5a5c6d1f..0a9c21d1c4 100644 --- a/external/book/content/book/en/v2/_index.html +++ b/external/book/content/book/en/v2/_index.html @@ -16,7 +16,11 @@ aliases: - "/book/en/v2/index.html" - "/book/en/v1/index.html" +- "/book/en/v1.html" - "/book/en/index.html" +- "/book/en.html" - "/book/index.html" +- "/book.html" - "/book/v1/index.html" +- "/book/v1.html" --- diff --git a/external/book/content/book/es/v2/_index.html b/external/book/content/book/es/v2/_index.html index a47c77b70e..caa0cd5d5f 100644 --- a/external/book/content/book/es/v2/_index.html +++ b/external/book/content/book/es/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/es/v2/index.html" - "/book/es/v1/index.html" +- "/book/es/v1.html" - "/book/es/index.html" +- "/book/es.html" --- diff --git a/external/book/content/book/fa/v2/_index.html b/external/book/content/book/fa/v2/_index.html index bb2d102037..6bdfa404c5 100644 --- a/external/book/content/book/fa/v2/_index.html +++ b/external/book/content/book/fa/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/fa/v2/index.html" - "/book/fa/v1/index.html" +- "/book/fa/v1.html" - "/book/fa/index.html" +- "/book/fa.html" --- diff --git a/external/book/content/book/fr/v2/_index.html b/external/book/content/book/fr/v2/_index.html index 9d71e4fe3a..c67beea35e 100644 --- a/external/book/content/book/fr/v2/_index.html +++ b/external/book/content/book/fr/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/fr/v2/index.html" - "/book/fr/v1/index.html" +- "/book/fr/v1.html" - "/book/fr/index.html" +- "/book/fr.html" --- diff --git a/external/book/content/book/gr/v2/_index.html b/external/book/content/book/gr/v2/_index.html index 4fc12be1be..094f8ca9af 100644 --- a/external/book/content/book/gr/v2/_index.html +++ b/external/book/content/book/gr/v2/_index.html @@ -17,5 +17,7 @@ aliases: - "/book/gr/v2/index.html" - "/book/gr/v1/index.html" +- "/book/gr/v1.html" - "/book/gr/index.html" +- "/book/gr.html" --- diff --git a/external/book/content/book/id/v2/_index.html b/external/book/content/book/id/v2/_index.html index 0f30a73447..b1f3fb0d4a 100644 --- a/external/book/content/book/id/v2/_index.html +++ b/external/book/content/book/id/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/id/v2/index.html" - "/book/id/v1/index.html" +- "/book/id/v1.html" - "/book/id/index.html" +- "/book/id.html" --- diff --git a/external/book/content/book/it/v2/_index.html b/external/book/content/book/it/v2/_index.html index cc8e3bd11c..b3d9c6fd3f 100644 --- a/external/book/content/book/it/v2/_index.html +++ b/external/book/content/book/it/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/it/v2/index.html" - "/book/it/v1/index.html" +- "/book/it/v1.html" - "/book/it/index.html" +- "/book/it.html" --- diff --git a/external/book/content/book/ja/v2/_index.html b/external/book/content/book/ja/v2/_index.html index 05e33da8d6..498ec16fe3 100644 --- a/external/book/content/book/ja/v2/_index.html +++ b/external/book/content/book/ja/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/ja/v2/index.html" - "/book/ja/v1/index.html" +- "/book/ja/v1.html" - "/book/ja/index.html" +- "/book/ja.html" --- diff --git a/external/book/content/book/ko/v2/_index.html b/external/book/content/book/ko/v2/_index.html index 49e81371f9..34730eaccb 100644 --- a/external/book/content/book/ko/v2/_index.html +++ b/external/book/content/book/ko/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/ko/v2/index.html" - "/book/ko/v1/index.html" +- "/book/ko/v1.html" - "/book/ko/index.html" +- "/book/ko.html" --- diff --git a/external/book/content/book/mk/v2/_index.html b/external/book/content/book/mk/v2/_index.html index 9ceb6d9eb1..e56bdc1a2b 100644 --- a/external/book/content/book/mk/v2/_index.html +++ b/external/book/content/book/mk/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/mk/v2/index.html" - "/book/mk/v1/index.html" +- "/book/mk/v1.html" - "/book/mk/index.html" +- "/book/mk.html" --- diff --git a/external/book/content/book/ms/v2/_index.html b/external/book/content/book/ms/v2/_index.html index d7b008aedd..37bab9b93c 100644 --- a/external/book/content/book/ms/v2/_index.html +++ b/external/book/content/book/ms/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/ms/v2/index.html" - "/book/ms/v1/index.html" +- "/book/ms/v1.html" - "/book/ms/index.html" +- "/book/ms.html" --- diff --git a/external/book/content/book/nl/v2/_index.html b/external/book/content/book/nl/v2/_index.html index 716354ed50..09396a9821 100644 --- a/external/book/content/book/nl/v2/_index.html +++ b/external/book/content/book/nl/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/nl/v2/index.html" - "/book/nl/v1/index.html" +- "/book/nl/v1.html" - "/book/nl/index.html" +- "/book/nl.html" --- diff --git a/external/book/content/book/pl/v2/_index.html b/external/book/content/book/pl/v2/_index.html index 0a38bcc9a5..359f9ce23e 100644 --- a/external/book/content/book/pl/v2/_index.html +++ b/external/book/content/book/pl/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/pl/v2/index.html" - "/book/pl/v1/index.html" +- "/book/pl/v1.html" - "/book/pl/index.html" +- "/book/pl.html" --- diff --git a/external/book/content/book/pt-br/v2/_index.html b/external/book/content/book/pt-br/v2/_index.html index 5988707aaa..47a66c4096 100644 --- a/external/book/content/book/pt-br/v2/_index.html +++ b/external/book/content/book/pt-br/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/pt-br/v2/index.html" - "/book/pt-br/v1/index.html" +- "/book/pt-br/v1.html" - "/book/pt-br/index.html" +- "/book/pt-br.html" --- diff --git a/external/book/content/book/pt-pt/v2/_index.html b/external/book/content/book/pt-pt/v2/_index.html index e7a437adca..39b4125479 100644 --- a/external/book/content/book/pt-pt/v2/_index.html +++ b/external/book/content/book/pt-pt/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/pt-pt/v2/index.html" - "/book/pt-pt/v1/index.html" +- "/book/pt-pt/v1.html" - "/book/pt-pt/index.html" +- "/book/pt-pt.html" --- diff --git a/external/book/content/book/ru/v2/_index.html b/external/book/content/book/ru/v2/_index.html index e4af751181..58bf01537b 100644 --- a/external/book/content/book/ru/v2/_index.html +++ b/external/book/content/book/ru/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/ru/v2/index.html" - "/book/ru/v1/index.html" +- "/book/ru/v1.html" - "/book/ru/index.html" +- "/book/ru.html" --- diff --git a/external/book/content/book/sl/v2/_index.html b/external/book/content/book/sl/v2/_index.html index 7703914a10..531535a005 100644 --- a/external/book/content/book/sl/v2/_index.html +++ b/external/book/content/book/sl/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/sl/v2/index.html" - "/book/sl/v1/index.html" +- "/book/sl/v1.html" - "/book/sl/index.html" +- "/book/sl.html" --- diff --git a/external/book/content/book/sr/v2/_index.html b/external/book/content/book/sr/v2/_index.html index f486b421b9..d018af3952 100644 --- a/external/book/content/book/sr/v2/_index.html +++ b/external/book/content/book/sr/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/sr/v2/index.html" - "/book/sr/v1/index.html" +- "/book/sr/v1.html" - "/book/sr/index.html" +- "/book/sr.html" --- diff --git a/external/book/content/book/sv/v2/_index.html b/external/book/content/book/sv/v2/_index.html index 37d6425017..814e2df8b1 100644 --- a/external/book/content/book/sv/v2/_index.html +++ b/external/book/content/book/sv/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/sv/v2/index.html" - "/book/sv/v1/index.html" +- "/book/sv/v1.html" - "/book/sv/index.html" +- "/book/sv.html" --- diff --git a/external/book/content/book/tl/v2/_index.html b/external/book/content/book/tl/v2/_index.html index 8f2181c3f6..d5a2ce721e 100644 --- a/external/book/content/book/tl/v2/_index.html +++ b/external/book/content/book/tl/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/tl/v2/index.html" - "/book/tl/v1/index.html" +- "/book/tl/v1.html" - "/book/tl/index.html" +- "/book/tl.html" --- diff --git a/external/book/content/book/tr/v2/_index.html b/external/book/content/book/tr/v2/_index.html index 180c0412f8..a8640317a0 100644 --- a/external/book/content/book/tr/v2/_index.html +++ b/external/book/content/book/tr/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/tr/v2/index.html" - "/book/tr/v1/index.html" +- "/book/tr/v1.html" - "/book/tr/index.html" +- "/book/tr.html" --- diff --git a/external/book/content/book/uk/v2/_index.html b/external/book/content/book/uk/v2/_index.html index c677f6e9f9..bee72f6988 100644 --- a/external/book/content/book/uk/v2/_index.html +++ b/external/book/content/book/uk/v2/_index.html @@ -16,5 +16,7 @@ aliases: - "/book/uk/v2/index.html" - "/book/uk/v1/index.html" +- "/book/uk/v1.html" - "/book/uk/index.html" +- "/book/uk.html" --- diff --git a/external/book/content/book/uz/v2/_index.html b/external/book/content/book/uz/v2/_index.html index e7317fcec4..e06b9eab88 100644 --- a/external/book/content/book/uz/v2/_index.html +++ b/external/book/content/book/uz/v2/_index.html @@ -14,5 +14,7 @@ aliases: - "/book/uz/v2/index.html" - "/book/uz/v1/index.html" +- "/book/uz/v1.html" - "/book/uz/index.html" +- "/book/uz.html" --- diff --git a/external/book/content/book/zh-tw/v2/_index.html b/external/book/content/book/zh-tw/v2/_index.html index f6707d4eaa..7468863441 100644 --- a/external/book/content/book/zh-tw/v2/_index.html +++ b/external/book/content/book/zh-tw/v2/_index.html @@ -17,5 +17,7 @@ aliases: - "/book/zh-tw/v2/index.html" - "/book/zh-tw/v1/index.html" +- "/book/zh-tw/v1.html" - "/book/zh-tw/index.html" +- "/book/zh-tw.html" --- diff --git a/external/book/content/book/zh/v2/_index.html b/external/book/content/book/zh/v2/_index.html index 325c93f372..fa084d9f77 100644 --- a/external/book/content/book/zh/v2/_index.html +++ b/external/book/content/book/zh/v2/_index.html @@ -17,5 +17,7 @@ aliases: - "/book/zh/v2/index.html" - "/book/zh/v1/index.html" +- "/book/zh/v1.html" - "/book/zh/index.html" +- "/book/zh.html" --- From e906153ca8b9d9c5c66bf832d5e0f5ba7f3b58d0 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 31 Jul 2025 03:41:33 +0200 Subject: [PATCH 4/4] book: take care of re-generating the "ugly" aliases The preceding commit adapted the `_index.html` files so that even after Hugo v0.148.0 aliases such as `/book.html` are generated. That commit included the necessary changes also for the (generated) `external/book/` files. Let's also adjust the script so that these explicit aliases will keep getting re-generated. Signed-off-by: Johannes Schindelin --- script/book.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/book.rb b/script/book.rb index 6c9a5fac33..1f709313cb 100644 --- a/script/book.rb +++ b/script/book.rb @@ -134,11 +134,15 @@ def save front_matter["aliases"] = [ "/book/#{@language_code}/v#{@edition}/index.html", "/book/#{@language_code}/v1/index.html", - "/book/#{@language_code}/index.html" + "/book/#{@language_code}/v1.html", + "/book/#{@language_code}/index.html", + "/book/#{@language_code}.html" ] if @language_code == "en" front_matter["aliases"].push("/book/index.html") + front_matter["aliases"].push("/book.html") front_matter["aliases"].push("/book/v1/index.html") + front_matter["aliases"].push("/book/v1.html") end front_matter["book"]["front_page"] = true front_matter["book"]["repository_url"] = "https://github.com/#{@@all_books[@language_code]}"