I run Hugo 0.15 and installed Hugo’s themes.
When I run hugo server --theme=cocoa --buildDrafts I get this error:
ERROR: 2016/01/01 template: theme/partials/li.html:2:43: executing “theme/partials/li.html” at <.Site.Params.DateFor…>: invalid value; expected string in theme/partials/li.html
bep
January 1, 2016, 9:26pm
2
Add this to the end of your config.toml
:
[params]
DateForm = "Mon, Jan 2, 2006"
Note: If you already have a params section, you must skip the header.
bep
January 1, 2016, 9:28pm
3
On an added note: We should try to get a more uniform parameter set up of all the themes, but until then, you can get some hints in this file:
[author]
name = "Steve Francia"
github = "spf13"
link = "http://gohugo.io/"
[params]
# Date format, used by several themes
DateForm = "Mon, Jan 2, 2006"
DateFormat = "Mon, Jan 2, 2006"
# Below fetched from theme Casper
description = "Make the Web Fun Again"
cover = "../../img/desk.jpg"
author = "Hugo"
authorlocation = "New York, USA"
authorwebsite = "http://gohugo.io"
bio= "Hugo is written for speed and performance. Great care has been taken to ensure that Hugo build time is as short as possible. We’re talking milliseconds to build your entire site for most setups."
logo = "../../img/hugoSM.png"
githubName = "spf13"
twitterName = "spf13"
This file has been truncated. show original
These are the main parameters used to get all the demo sites on http://themes.gohugo.io to work.
amy_shi
October 25, 2016, 12:32am
4
I got this error as well. I checked config.toml and this line is already included under params for me, but I still get the error. What else could be the issue?