lingxz / er

:snail: a hugo theme
https://themes.gohugo.io/theme/er/
MIT License
59 stars 25 forks source link

Error using ER in Hugo quickstart #1

Closed emiguelt closed 6 years ago

emiguelt commented 6 years ago

Hello, I a newbie with Hugo and I'm trying this theme, but I'm getting the following error

Building sites … ERROR 2018/05/29 23:25:38 Error while rendering "taxonomyTerm" in "": template: /home/emiguel/src/emiguelt/quickstart/themes/er/layouts/_default/terms.html:5:5: executing "/home/emiguel/src/emiguelt/quickstart/themes/er/layouts/_default/terms.html" at <partial "nav.html" .>: error calling partial: template: theme/partials/nav.html:1:22: executing "theme/partials/nav.html" at <len .Site.Menus.main>: error calling len: len of untyped nil

My config.toml:

baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "er

Do I need to add any other source? Could you please provide a config file example.

Thanks a lot!

emiguelt

lingxz commented 6 years ago

Ah sorry, this is a bug. I have just pushed a fix so if you pull the newest update this error should disappear. If you're curious, this happened because you didn't have any menu links specified in config.toml, but the theme should now work even without it.

emiguelt commented 6 years ago

Tks a lot! It works, but then I have the following error: Building sites … ERROR 2018/05/30 14:12:29 Error while rendering "home" in "": template: D:\src\emiguelt\quickstart\themes\er\layouts\index.html:23:3: executing "main" at <partial "tag_cloud.h...>: error calling partial: template: theme/partials/tag_cloud.html:5:13: executing "theme/partials/tag_cloud.html" at <first $maxtags .Site...>: error calling first: both limit and seq must be provided

lingxz commented 6 years ago

hmm that's weird, I think that might be because you don't have any tags yet (though I don't seem to get that error even without any tags), you can either add tags to your posts or turn off the tag cloud by adding to your config.toml

[params]
showTagCloud = false
emiguelt commented 6 years ago

thanks again! The problem was that I have the first post as draft = true, I changed it to false, and rebuilt it successfully.