Closed blob42 closed 6 years ago
Thanks for getting in touch, but it feels like this is a question that would be better suited to the Hugo Discussion Forum. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug. You may also find the answers you search for in Hugo Documentation.
@bep I posted a link to a test repo on the forums and it seems it's actually a bug with the JSON format of front matter
Hi everyone, I am having the same error message, caused identically by GroupByParamDate, with an hugo website with the hugo-academic theme.
The interesting thing is that everything was working perfectly until I converted the frontmatter of all pages into YAML syntax (--- key: value
) rather than TOML. Everything was fine until the last page of the section, and even after I converted this last page to YAML, if hugo was running as server
mode, it correctly regenerated the page. But after stopping the server and trying to the build again, it fails with the same error.
Could it be possible to integrate @sp4ke fix into Hugo?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hugo version: v0.36.1 linux/amd64 Go version: v1.10
I have a custom date param that looks like this on my front matter
This date param is used in many pages and I want to use it to group and order content. I tried using
.GroupByParamDate
like thisThis produces the following error
ERROR 2018/02/21 17:39:17 Failed to render "theme/index.html": runtime error: index out of range
I made sure the
my_param
parameter is set and readable. I can even use it withGroupByParam
without problem.Problem is the custom param is parsed as string in Hugo so I cannot use the "sort" function reliably. It actually seems to work following the Golang string comparison function but there is no guarantee this sort is going to work on all dates. Or am I missing something ?
What would be the best way to achieve what I need ?