I have been updating my personal website and trying other themes/project types for varfious portfolios. Not sure what happened exactly, but now every time I run build_site() or serve_site() I get the following errors,l respectively:
build_site():
blogdown::build_site()
Start building sites …
hugo v0.94.1-0FCD9A5D+extended darwin/amd64 BuildDate=2022-03-11T13:53:32Z VendorInfo=gohugoio
WARN 2022/03/11 15:45:45 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct similar to the one below:
{{ $path := "" }}
{{ with .File }}
{{ $path = .Path }}
{{ else }}
{{ $path = .Path }}
{{ end }}
Re-run Hugo with the flag --panicOnWarning to get a better error message.
ERROR 2022/03/11 15:45:46 render of "page" failed: "/Users/saraandchris/Desktop/CJSchmankWebsite/themes/hugo-academic/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
ERROR 2022/03/11 15:45:46 render of "page" failed: "/Users/saraandchris/Desktop/CJSchmankWebsite/themes/hugo-academic/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
ERROR 2022/03/11 15:45:46 render of "page" failed: "/Users/saraandchris/Desktop/CJSchmankWebsite/themes/hugo-academic/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
ERROR 2022/03/11 15:45:46 render of "page" failed: "/Users/saraandchris/Desktop/CJSchmankWebsite/themes/hugo-academic/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
Total in 348 ms
Error: Error building site: failed to render pages: render of "page" failed: "/Users/saraandchris/Desktop/CJSchmankWebsite/themes/hugo-academic/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
serve_site()
Launching the server via the command:
/Users/saraandchris/Library/Application Support/Hugo/0.94.1/hugo 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: "/Users/saraandchris/Desktop/CJSchmankWebsite/themes/hugo-academic/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types