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:
-
The
netlify.toml
inthemes/hugo-apero
hasHUGO_VERSION = "0.80.0"
in[build.environment]
while thenetlify.toml
in theroot
hasHUGO_VERSION = "0.92.0"
. From what I gathered, this happened because thethemes
folder were built withHugo
in version 0.80.0, and the version I recently downloaded is 0.92.0 - and this should be no problem. Am I correct? -
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 simplelist
, but this should be no problem as per the 05:Section Configuration in the Hugo-Apéro website. -
I did Google for
cannot convert type page.PagesGroup to Pages
, but didn't get much out of it. -
While the
build.command
failed in Netlify and it points tonetlify.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