Can't seem to get theme working

I recently changed laptop and had reinstalled Hugo on my new machine. After cloning my repo and trying to run hugo server, I get a whole bunch of errors which I think is related to the theme or something(I’m not sure)

I did hugo --theme=ghostwriter and that brought up this bunch of errors:

ERROR: 2019/04/19 12:16:47 template.go:350: template: theme/partials/page-header.html:9: function "default" not defined
ERROR: 2019/04/19 12:16:47 template.go:350: template: theme/partials/page-stub.html:20: function "default" not defined
ERROR: 2019/04/19 12:16:47 template.go:350: template: theme/partials/post-footer.html:7: function "relLangURL" not defined
ERROR: 2019/04/19 12:16:47 template.go:350: template: theme/partials/post-header.html:9: function "default" not defined
ERROR: 2019/04/19 12:16:47 template.go:350: template: theme/partials/post-stub.html:9: function "default" not defined
ERROR: 2019/04/19 12:16:47 template.go:119: template: partials/seo_schema.html:25:22: executing "partials/seo_schema.html" at <.WordCount>: WordCount is not a field of struct type *hugolib.Node in partials/seo_schema.html
ERROR: 2019/04/19 12:16:47 general.go:222: Error while rendering taxonomy tag: template: theme/_default/list.html:5:2: executing "theme/_default/list.html" at <.Content>: Content is not a field of struct type *hugolib.Node

I should categorically state that everything seems to be working except my blog posts content is not displaying on the home page but when I manually navigate to the exact URL of the article (http://localhost:1313/thoughts/hello-world/), it works (although my title and description will not show).

P.s: I have changed laptop before and it worked without any issue, now I don’t know what went wrong.
Here is the repo

I’m using a linux Ubuntu machine and somehow when I ran sudo apt-get install hugo, it went ahead and install 0.16DEV version, I don’t know why, has to do with Ubuntu I guess.

So I went ahead and removed it and used snap instead to install it.
sudo snap install hugo and I got the latest version and things work fine now :slightly_smiling_face:

1 Like