themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.
https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
354 stars 509 forks source link

Request for better error output #24

Closed afs2015 closed 6 years ago

afs2015 commented 6 years ago

I'm new to Hugo and one issue I had using this template is when I was following the quickstart tutorial for Hugo I ran into this error.

hugo server -D
Building sites … ERROR 2018/07/13 14:33:01 Error while rendering "page" in "posts/": template: _default/single.html:20:126: executing "_default/single.html" at <.Site.Params.datefor...>: invalid value; expe

I managed to solve it by adding the following code to my config.toml file: [params] dateformat = "July 13, 2018"

Would it be possible to edit the error message thrown to ask users to check if they configured dateformat in their config.toml file? I think this could create a better install experience for newer users.

mehedi-sharif commented 6 years ago

@kausarpial could you please check this issue .

kausarpial commented 6 years ago

You should give the dateformat in config.toml. We can't control the hugo errors messages because it's generated by defaults from HUGO. We will update the theme for not showing the dates if their is no dateformat in config.toml file Thanks

afs2015 commented 6 years ago

Thanks for the follow up guys! This theme is great and I appreciate all the work you've put in.