-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Hugo Config option for blog URLs: avoid deprecation #2439
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
base: trunk
Are you sure you want to change the base?
Hugo Config option for blog URLs: avoid deprecation #2439
Conversation
WARN deprecated: the ":filename" permalink token was deprecated in Hugo 0.144.0 and will be removed in a future release. Use ":contentbasename" instead.
❌ Deploy Preview for selenium-dev failed.
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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 seems the build is failing.
In order to have a Hugo that supports the current way of expression, I set hugo-version to the current release in the CI jobs I could find. cc @diemol |
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.
Thank you for this.
However, there are other places where version 0.125.4 is set. Like the netlify.toml
file.
e4cfddc
to
b2948d0
Compare
I learned that there were a few more places. In situations like this, I often write a script/update_hugo_version shell script (perhaps in Ruby or something that is convenient for me) that updates all the places. |
This is the error the Netlify build reports. I am not sure why the GitHub Actions build does not report the same.
|
@diemol There is a concept of “extended Hugo”, perhaps that has a different set of available commands/a different deprecation schedule. On my local macOS brew install, I got the warning about twitter, but not the error there. |
I think the problem is this one:
Yes, we use extended Hugo, because Docsy requires it. |
User description
Description
This PR avoids a warning emitted by latest Hugo at start of generating the website.
Motivation and Context
We want to follow current Hugo practices, to have a working website.
Update: hugo v0.125.4 is running in the GitHub Action. So that doesn't have support for that feature yet.
Now https://github.com/peaceiris/actions-hugo?tab=readme-ov-file#options CAN configure a newer one.
Update: I chose to update to latest Hugo in the jobs that required a newer one.
12:02:55 PM: ERROR deprecated: data.GetJSON was deprecated in Hugo v0.123.0 and subsequently removed. use resources.Get or resources.GetRemote with transform.Unmarshal.
Hints in this help article - https://discourse.gohugo.io/t/how-to-replace-the-data-getjson-with-resources-getremote-or-resources-get/52728/4Types of changes
Checklist
PR Type
Other
Description
:filename
with:contentbasename
in Hugo permalinksDiagram Walkthrough
File Walkthrough
hugo.toml
Update Hugo permalink configuration
website_and_docs/hugo.toml
:filename
token with:contentbasename
in blogpermalinks configuration