Update Hugo and Pagefind to their respective latest versions#2026
Merged
To1ne merged 4 commits intogit:gh-pagesfrom Jul 31, 2025
Merged
Update Hugo and Pagefind to their respective latest versions#2026To1ne merged 4 commits intogit:gh-pagesfrom
To1ne merged 4 commits intogit:gh-pagesfrom
Conversation
7fa6cec to
eb9981f
Compare
Member
Author
|
Looks like upgrading to Hugo v0.148.0 causes build failures due to these breaking changes in Hugo. |
eb9981f to
bfe364c
Compare
This fixes git#1995. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
bfe364c to
e9be74a
Compare
As of v0.148.0, Hugo no longer generates `<base>.html` files for `<base>/_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 `<base>.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 <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
f5dedca to
e906153
Compare
To1ne
reviewed
Jul 31, 2025
| url: /downloads.html | ||
| aliases: | ||
| - /downloads/index.html | ||
| - /download/index.html |
Collaborator
There was a problem hiding this comment.
Why are we adding these singular aliases?
Member
Author
There was a problem hiding this comment.
It's actually half a bug fix. We used to support only the URLs without the trailing slash for those aliases. And thanks to the change in Hugo, now we would only support the ones with the slashes. Now we support both.
To1ne
reviewed
Jul 31, 2025
Collaborator
|
@dscho Overall it looks good. Just a few questions though. |
Collaborator
|
@dscho So this is ready to merge? |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Context
It is always good to stay reasonably up to date. In particular with the recent updates of Hugo's template logic, it opens the door for uncluttering
layouts/_default/baseof.htmla little, and now that that flurry of Hugo updates (to make said new template logic work) seems to have calmed down, it's a good idea to go for that update and see where it leads us.This fixes #1995.