Hugo Config option for blog URLs: avoid deprecation#2439
Hugo Config option for blog URLs: avoid deprecation#2439diemol merged 5 commits intoSeleniumHQ:trunkfrom
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 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
diemol
left a comment
There was a problem hiding this comment.
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 |
diemol
left a comment
There was a problem hiding this comment.
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. |
I looked at https://discourse.gohugo.io/t/how-to-replace-the-data-getjson-with-resources-getremote-or-resources-get/52728/4 to learn a little about how to do it.
|
@diemol I attempted to make a change, can you "approve the CI build"? |
* Hugo Config option for blog URLs: avoid deprecation
WARN deprecated: the ":filename" permalink token was deprecated in Hugo 0.144.0 and will be removed in a future release. Use ":contentbasename" instead.
* Refer to latest Hugo release
* Hugo: stop using getJSON
I looked at https://discourse.gohugo.io/t/how-to-replace-the-data-getjson-with-resources-getremote-or-resources-get/52728/4 to learn a little about how to do it.
---------
Co-authored-by: Diego Molina <[email protected]>
[deploy site] 7baeff3
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.
TODO
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
:filenamewith:contentbasenamein Hugo permalinksDiagram Walkthrough
File Walkthrough
hugo.toml
Update Hugo permalink configurationwebsite_and_docs/hugo.toml
:filenametoken with:contentbasenamein blogpermalinks configuration