-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update Hugo and Pagefind to their respective latest versions #2026
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
Conversation
7fa6cec
to
eb9981f
Compare
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
@@ -4,6 +4,8 @@ | |||
url: /downloads.html | |||
aliases: | |||
- /downloads/index.html | |||
- /download/index.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding these singular aliases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@dscho Overall it looks good. Just a few questions though. |
@dscho So this is ready to merge? |
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.html
a 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.