balaramadurai / hugo-travelify-theme

Port of Aigars Silkalns's Wordpress theme Travelify to Hugo. Demo -
http://balaramadurai.github.io
MIT License
40 stars 27 forks source link

Error if 'slider' folder is empty #18

Closed darhon closed 6 years ago

darhon commented 6 years ago

Hi,

I copy content of exampleSite to the root folder. But I got error if I deleted YAML files from data/slider :

ERROR 2018/07/08 20:07:53 Error while rendering "home" in "": template: index.html:9:4: executing "index.html" at <partial "slider" .>: error calling partial: template: partials/slider.html:6:11: executing "partials/slider.html" at <len .Site.Data.slide...>: error calling len: len of untyped nil
Total in 9 ms
ERROR 2018/07/08 20:07:53 Failed to rebuild site: logged 1 error(s)

Can I have slider (automatic or manual) from posts only without having YAML files in the data/slider folder?

balaramadurai commented 6 years ago

Thanks @darhon for your interest in the Travelify theme. Thanks also for raising this issue. I have fixed the bug in this commit.

Thanks and have a great day! Bala