xiaoheiAh/hugo-theme-pure

Error building site

Closed this issue · 5 comments

`Building sites … ERROR 2019/12/27 15:08:31 render of "taxonomyTerm" failed: execute of template failed: template: _default/category.terms.html:30:46: executing "_default/category.terms.html" at <len .Site.Params.mainsections>: error calling len: len of untyped nil

ERROR 2019/12/27 15:08:31 render of "home" failed: execute of template failed: template: index.html:30:46: executing "index.html" at <len .Site.Params.mainsections>: error calling len: len of untyped nil
Total in 11 ms

Error: Error building site: failed to render pages: render of "taxonomyTerm" failed: execute of template failed: template: _default/tag.terms.html:30:46: executing "_default/tag.terms.html" at <len .Site.Params.mainsections>: error calling len: len of untyped nil
`

I am using
Hugo Static Site Generator v0.58.1-24277B92/extended linux/amd64 BuildDate: 2019-09-06T09:25:12Z

please paste your config.yml.
@kprasadvnsi according to your error log, may be you didn't set this param.

params:
  # the directory under content folder that you want to render
  mainSections: ["posts"]

yup, you are right. adding this code solves the problem.

I followed the Hugo quickstart guide and most of the themes work out of box with default config.tomal file. IMHO this theme should also be compatible with the official Hugo quickstart guide.

May be later.You can take a look at examleSite/config.yaml and READEME