Brand new hugo user here.
I am running Ubuntu 16.04 and have installed go and hugo using apt-get.
When following the Quick Start guide I run into issues.
Step 1: Install Hugo
brew install hugo
This step works. The reported version of hugo is “Hugo Static Site Generator v0.16-DEV BuildDate: 2016-02-06T12:14:17-05:00” which in typical Ubuntu fashion is quite out of date.
Step 2: Create a New Site
hugo new site quickstart
This step also seems to work.
Step 3: Add a theme
The anake theme seems to be installed correctly.
Step 4: Add Some Content
hugo new posts/my-first-post.md
This is where my problems begin. The above command gives a single line error message: “Error: Near line 2 (last key parsed ‘’): Expected a top-level item to end with a new line, comment or EOF, but got ‘-’ instead.”
I searched online and found that the issue could be caused by the lack of an archetypes/default.md
file. (At this point in time I have an archetypes/
folder but it is empty.) I created this file with the following suggested content:
+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = true
+++
Then I tried following Step 4 again, but I get the same error.
Running hugo check
gives the following errors.
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/_default/baseof.html:2: function "default" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/_default/terms.html:12: function "relLangURL" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/index.html:6: function "default" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/page/single.html:7: function "humanize" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/menu-contextual.html:8: function "humanize" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/page-header.html:9: function "default" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/site-footer.html:4: function "now" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/site-header.html:1: function "default" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/summary-with-image.html:23: function "default" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/summary.html:3: function "humanize" not defined
ERROR: 2018/10/13 13:30:54 template.go:350: template: theme/partials/tags.html:4: function "relLangURL" not defined
No source files provided.
I searched online with these errors and it was suggested to upgrade to V0.16-DEV, but that is the version that I am running … unless there are multiple different versions of V0.16-DEV?
Any help would be appreciated.
tldr Step 4 of the Quick Start doesn’t work on Ubuntu 16.04 even when following the most common suggested fixes online more than once.