.Page.Hugo is deprecated console warning

After many months of not having time to look at it, I’m trying to resurrect my blog, publish a few new posts, and in general whip it back into shape. However, on running hugo locally I get the error “Page.Hugo is deprecated…” Well, yes, I know that, so I’ve got rid of pages in my blog. I’m using the blackburn theme, and creating the blog in Emacs org mode using Kaushal Modi’s magical ox-hugo package for exporting to markdown.

This should all be fine, but now I’m still getting that Page warning (as well as one about no layout rule for HTML “Section” but I can fix that… I think) and another warning about Page.RSS being deprecated.

What is more annoying - and I have no idea if it is in any way related to those warnings - is that my last blog post is not being sent to the blog for viewing, and I’ve got no idea how to troubleshoot this.

So I guess I have these questions:

  1. How do I scupper Page warnings once and for all?
  2. What is the alternative? I used to like having a few places on the blog separate from the main posts where I could put information about the blog, and even a few image libraries. Pages were great for this. The hugo output “Use the global hugo function” is not useful in itself but then I admit I have yet to RTFM as carefully as I should.
  3. How do I troubleshoot the non-appearance of a newly written post? It’s simply not appearing in the blog, and there are no obvious errors either from ox-hugo or hugo itself.

Thank y’all!

I have found one issue: the theme I was using hasn’t been updated for about three years and makes references to Hugo pages. I’ve changed the theme to a more recently updated one (Clarity) which has helped. In fact this one change seems to have fixed most of my issues (and created a few others… but there you go).

Hi @amca, you are not posting a sample of these warnings. They are most time relative clear what the solution is (ie. what to use instead). I would go through all layouts folders and search for occurences of this variable. The global Hugo function is $. In most cases you can for instance replace .Site with $.Site (example, depends on the warning in the output).

Please post your warnings here (and add three backticks before and after ``` so the code is properly formatted.

In my parts of the planet we have a saying: “a hand aches, so time to chop it off”.

No mate. Things do not work like that. The console gave you a WARN about

.Page.Hugo is deprecated Use the global hugo function.

Had you followed the Requesting Help guidelines and searched the Documentation you would have encountered the following function:

And by the way I think that the console message is very helpful and there is no curiosity in that warning.

In the end you need to research a bit before opening a redundant topic.

Thank you, and I apologise for wasting time and bandwidth. I’ll crawl back under my rock now…!

Nobody told you to crawl under your rock, just be a bit more willing to engage with the forum rules.

Also reading the tips in Requesting Helpit will help you in the long run.

I know - but I can’t help feeling a bit stupid! (You’d think I’d be used to it by now.) But anyway, many thanks for your help.

We all feel stupid every now and then.

Let me tell you.

Yesterday I got stuck working in a Hugo project trying to find a way to share a template across Output Formats. Took me a long time until I found how to do it. In the end it was a simple but undocumented way. I shared the workflow here.

I’ve come back to Hugo after about 10 or more months away from it, and I’m trying to drag myself into the work of modern Hugo, getting to grips with shortcodes etc (which I’ve never had to use), and resurrect some old posts which no longer render properly. Ah well - how else should I be spending my summer leave? (I’m in Melbourne, Australia.)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.