How to "unbreak" my blogdown website? Problem in the `themes` folder when calling `Paginate`.

After watching one of Allison Hill's amazing videos, I got back to building and updating my website with blogdown (Side note: I am really happy with the result). Today, after a long session of commits and pushes, I "broke" the webiste.

Below, I posted the error messages I got from the console in RStudio after I ran blogdown::serve_site() and the deploy log from Netlify.

And here are my comments/questions:

  1. The netlify.toml in themes/hugo-apero has HUGO_VERSION = "0.80.0" in [build.environment] while the netlify.toml in the root has HUGO_VERSION = "0.92.0". From what I gathered, this happened because the themes folder were built with Hugo in version 0.80.0, and the version I recently downloaded is 0.92.0 - and this should be no problem. Am I correct?

  2. As you can see from the messages below, the error seems to be the layout for Talks, one of the websites section. I did change the layout to a simple list, but this should be no problem as per the 05:Section Configuration in the Hugo-Apéro website.

  3. I did Google for cannot convert type page.PagesGroup to Pages, but didn't get much out of it.

  4. While the build.command failed in Netlify and it points to netlify.toml, I didn't get to find the error.

All help will be greatly appreciated.


When I run blogdown::serve_site(), here's what I get:

Launching the server via the command:
C:/Users/santa/AppData/Roaming/Hugo/0.92.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-apero -D -F --navigateToChanged
Error: Error building site: failed to render pages: render of "section" failed: "G:\My Drive\myblog\themes\hugo-apero\layouts\talk\list.html:10:21": execute of template failed: template: talk/list.html:10:21: executing "main" at <.Paginate>: error calling Paginate: cannot convert type page.PagesGroup to Pages

When I check the deploy log from Netlify, I get this:

─────────────────────────────────────────────────────────────
7:48:51 PM: 1. build.command from netlify.toml
7:48:51 PM: ─────────────────────────────────────────────────────────────
7:48:51 PM: ​
7:48:51 PM: $ hugo
7:48:51 PM: Start building sites …
7:48:51 PM: hugo v0.92.0-B3549403+extended linux/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio
7:48:51 PM: ERROR 2022/01/17 00:48:51 Page.UniqueID is deprecated and will be removed in Hugo 0.93.0. Use .File.UniqueID
7:48:51 PM: Error: Error building site: failed to render pages: render of "section" failed: "/opt/build/repo/themes/hugo-apero/layouts/talk/list.html:10:21": execute of template failed: template: talk/list.html:10:21: executing "main" at <.Paginate>: error calling Paginate: cannot convert type page.PagesGroup to Pages
7:48:51 PM: Total in 499 ms
7:48:51 PM: ​
7:48:51 PM: ─────────────────────────────────────────────────────────────
7:48:51 PM: "build.command" failed
7:48:51 PM: ─────────────────────────────────────────────────────────────
7:48:51 PM: ​
7:48:51 PM: Error message
7:48:51 PM: Command failed with exit code 255: hugo
7:48:51 PM: ​
7:48:51 PM: Error location
7:48:51 PM: In build.command from netlify.toml:
7:48:51 PM: hugo
7:48:51 PM: ​
7:48:51 PM: Resolved config
7:48:51 PM: build:
7:48:51 PM: command: hugo
7:48:51 PM: commandOrigin: config
7:48:51 PM: environment:
7:48:51 PM: - HUGO_VERSION
7:48:51 PM: - HUGO_ENV
7:48:51 PM: publish: /opt/build/repo/public
7:48:51 PM: publishOrigin: config

Out of curiosity, did you try with another Hugo version ?

Just in case they change something in 0.92 and the theme hugo-apero does not work anymore with it.

Related to the error I found this with my googling skills

I think the issue rely in your new layout template. Can you share the content ?

Hello, @cderv

I'm sorry for the late reply. The task of "unbreaking" my hugo-apero code proved a lot harder than I predicted so I walked away from it for a while.

To answer your question: No, I did not try with another Hugo version. I'm not quite sure how I'd do that. Before I started building the website, I installed the latest version of blogdown and updated hugo from blogdown.

I should say that whenever I make a post, for instance, from the original hugo-apero template a draft so it does not show in the deployed website, no errors are found. The error I'm dealing with has to do with the talks from hugo-apero.

What do you mean by "my new layout template"? And if you specify what kind of content you're referring to, I'll gladly share it.

Thanks a lot for reaching out.

You can use blogdown::install_hugo() to install any version available. and you can use blogdown.hugo.version option to use a specific version with your project.
See

You mentioned that you changed the layout somehow

So I was wondering if this is from the change.

If you think this is an issue in the theme, you could open an issue in Github repo for hugo apero.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.