Skip to content

Fix deprecation warning#364

Closed
deining wants to merge 1 commit intoVimux:masterfrom
deining:fix-deprecation-warning
Closed

Fix deprecation warning#364
deining wants to merge 1 commit intoVimux:masterfrom
deining:fix-deprecation-warning

Conversation

@deining
Copy link
Copy Markdown
Contributor

@deining deining commented Apr 1, 2024

When previewing the example site with hugo v0.124.1, a warning is shown:

WARN  The author key in site configuration is deprecated. Use params.author.name instead.

This PR fixes this warning.

@Vimux
Copy link
Copy Markdown
Owner

Vimux commented Apr 3, 2024

This PR fixes this warning.

This is a breaking change as it will require manual action by users of existing sites if they want to update the theme. It will break our demo site as well.

Preview

@deining
Copy link
Copy Markdown
Contributor Author

deining commented Apr 3, 2024

This PR fixes this warning.
It will break our demo site as well.

Where does the site break?

This is a breaking change as it will require manual action by users of existing sites if they want to update the theme.

Feel free to close this PR if you don't like it or you think it comes in prematurely.

@Vimux
Copy link
Copy Markdown
Owner

Vimux commented Apr 9, 2024

Where does the site break?

I gave a link to the preview page where the problem is pretty clear.

pr-authorbox-problem

Feel free to close this PR if you don't like it or you think it comes in prematurely.

One thing I can say for sure is that we do not break users' sites without a really good reason, and especially without a commit properly marked as BREAKING.


Regarding the Hugo warning. My concern is how Hugo will deprecate this thing (as well as .Site.IsServer). Will we be able to use .Site.Author as the default after this? Will it throw an error when called from templates for newer versions? Let's just wait and fix it once, instead of guessing how exactly things will break in Hugo this time. I'm definitely not a fan of releasing patch after patch after patch. Who knows, maybe a real miracle will happen and we will be able to avoid breaking changes. Closed for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants