I am converting a Jekyll site to Hugo and has an issue with the list view.
I have a list view in _default/list.html
I have tried to build a similar view to a Jekyll list view, but for some strange reasons this has some issues:
.Author is rendered as { map[]} on the page and .Content is rendered with no markup. But there is no problem with RelPermalink, Title and Date.
´´´
{{ partial “header” . }}
-
{{ .Title | markdownify }}
{{ .Date.Format "January 2, 2006" }}
{{ .Author }}
{{ .Content }}
{{ if gt (len .Content) 250 }}{{slicestr .Content 0 250 | markdownify}} {{ end }} <br> <a href="{{ .RelPermalink }}">Read more...</a> </li> {{ end }} </ul> </section> </div>´´´
In each content file I have:
+++
author = "Kurt Olsson"
date = "2016-04-18T17:05:09Z"
categories = [“Test”, “Test two”]
title = "Mobile Payments is a twist on identity rather than transactions"
url = “/2016/04/18/mobile-payment/”
+++I also tried to include categories in the list view with no luck.
I am using Hugo 0.19
{{ range .Data.Pages.ByPublishDate }}