devcows / hugo-universal-theme

Universal theme for Hugo, it stands out with its clean design and elegant typography.
https://devcows.github.io/hugo-universal-theme
MIT License
790 stars 561 forks source link

Some error during build #12

Closed wsokc closed 8 years ago

wsokc commented 8 years ago

Hi Adrian,

Your theme is the only theme in Hugo that caused me to port all my wordpress site since 2006 to Hugo. Basically I have converted all the wordpress content to Hugo and after integrate it into your theme Tried to googled around but seems I couldn't found any, must be my lack of skill.

I've got this error when I ran Hugo server.

0 draft content 0 future content 702 pages created 852 non-page files copied 541 paginator pages created 242 tags created 22 categories created in 5839 ms

Change detected, rebuilding site 2016-09-04 21:53 +0800 ERROR: 2016/09/04 21:53:49 template.go:131: template: theme/partials/carousel.html:3:10: executing "theme/partials/carousel.html" at <len .Site.Data.carou...>: error calling len: len of untyped nil in theme/partials/carousel.html ERROR: 2016/09/04 21:53:49 template.go:131: template: theme/partials/features.html:3:10: executing "theme/partials/features.html" at <len .Site.Data.featu...>: error calling len: len of untyped nil in theme/partials/features.html ERROR: 2016/09/04 21:53:49 template.go:131: template: theme/partials/testimonials.html:3:10: executing "theme/partials/testimonials.html" at <len .Site.Data.testi...>: error calling len: len of untyped nil in theme/partials/testimonials.html ERROR: 2016/09/04 21:53:49 template.go:131: template: theme/partials/clients.html:3:10: executing "theme/partials/clients.html" at <len .Site.Data.clien...>: error calling len: len of untyped nil in theme/partials/clients.html

Thanks in advanced, Cheers, Raff

adrianmo commented 8 years ago

Hi @wsokc,

Thanks for choosing this theme :)

I think the error is caused because you have the carousel, features, testimonials, and clients enabled in the config file but there is nothing in the data directory.

If you are not using these features of the landing page, you can just disable them in the config.toml file.

...
[params.carousel]
    enable = false
...
[params.features]
    enable = false
...
[params.testimonials]
    enable = false
...
[params.clients]
    enable = false
...

Otherwise, if you do want to enable them, make sure you fill in the data directory with the appropriate information. You can take a look at the exampleSite directory.

Let me know how it goes.

Best,

Adrian

wsokc commented 8 years ago

Thanks Adrian,

Seems to be true.

Cheers, Raff

adrianmo commented 8 years ago

Glad it worked :) I'm closing the issue...

Best, Adrian

sureshsass commented 6 years ago

I just started to work on Hugo. Liked your theme. So tried it on MacBook with your example site. Working fine. Then I installed Hugo on windows and with your theme tried on Windows. HAve problems with the home page 1) No carrousel. Directly showing the WebDesign, Print.. etc on the top. In Testimonials apart from "We have worked .." individual testimonies not showing up. From our blog is ok. Under Our Clients the images are not showing up. I copied the folder with themes from my Mac in to windows laptop. No change. Same issues persist. Thanks'