Hugo Serve warning

I’ve been away from using Hugo for a few months and have come back to find its been updated (nicely!) quite a bit. The documentation is much improved as well!

However, when I run hugo serve on the site I am working on, I now get a warning that is not very clear to me:

“WARNING: Page’s Now is deprecated and will be removed in a future release. Use now (the template func.)”

Does anyone know what this means? I’m not familiar with anything called Page’s Now and didn’t find any documentation for it. Any help with what this means, and thus implications for my build, is greatly appreciated.

It means that the Page’s Now method is deprecated and will be removed in a future release. So, replace .Now with now and the warning will go away (search in your layouts folder (or in your theme’s layouts folder)).

1 Like

Are you meaning this is a param, where lower case simply needs to be in used rather than upper case: Pages.Now should now be Pages.now?

No, it’s a method, but to make it short: Just replace all strings in the templates that says “.Now” (without the quotes) with “now” (again, ignore the quotes), and you should be good.

OK, I’ll hunt that up. Thanks for the input!