I have the following structure in my project.
site/content/_index.md
site/themes/themename/layouts/index.html
In my homepage layout I want to access the content of the _index.md file. Including {{.Content}} in the template is resulting in the following error:
Error while rendering homepage: template: theme/index.html:37:12: executing “theme/index.html” at <.Content>: Content is not a field of struct type
When I loop over the content in the index.html file I see the _index.md as a separate post. Doesn’t seems right?
{{- range first 10 .Data.Pages }}
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
{{- end }}