Reputation: 11
It's been a few year's since updating my personal website: https://statsbylopez.netlify.com/
That site was built with what now appears to be an outdated Hugo theme (hugo-academic).
On a new computer, I've downloaded the same repo and went to make changes, but when trying to render the site, ran into errors.
blogdown:::serve_site()
Renders the following error
Launching the server via the command:
C:/Users/michael.lopez/AppData/Roaming/Hugo/0.101.0/hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -t hugo-academic -D -F --navigateToChanged
Error: Error building site: failed to render pages: render of "page" failed: "C:\Users\michael.lopez\Documents\GitHub\mlopez\themes\hugo-academic\layouts\_default\single.html:1:3": execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "header.html" .>: error calling partial: "C:\Users\michael.lopez\Documents\GitHub\mlopez\themes\hugo-academic\layouts\partials\header.html:9:10": execute of template failed: template: partials/header.html:9:10: executing "partials/header.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
It appears the original Hugo themes are outdated (wowchemy), but I also know changing themes is not recommended (see here).
Any advice?
Upvotes: 1
Views: 582
Reputation: 30114
This is the same problem as the one reported in the blogdown Github repo. I'm just copying the answer here:
If you have an old site with the wowchemy/academic theme that used to work, it shouldn't be too hard to make it continue to work. The only thing you need to figure out is which Hugo version you were using at that time. Then pin the Hugo version in .Rprofile
(follow the tips of blogdown::check_site()
). If you don't remember the version now, you may
either view the HTML source of the old site and see if the Hugo version was written there (of the form <meta name="generator" content="Hugo X.Y[.Z]" />
or browse the Hugo releases: https://github.com/gohugoio/hugo/releases and guess the version released at about the same time as when your old site was created.
Then install that version of Hugo with blogdown::install_hugo("THAT_VERSION")
.
Upvotes: 2
Reputation: 1046
Upvotes: 1