I have the following hierarchy in my content directory to emulate a headless leaf bundle:
and the contents of my index.md file are:
---
headless: true
---
I’m trying to get all page resources in that leaf bundle named: homepage
in my single page template with the following contents:
{ define "main" }}
{{ $headless := .Site.GetPage "homepage" }}
{{ $sections := $headless.Resources.Match "*" }}
<main class="content" role="main">
{{ range $index_val, $elem_val := $sections }}
<div>
{{ $index_val }} -- {{ $elem_val }}
</div>
{{ end }}
</main>
{{ end }}
Unfortunately, I’m receiving an empty array of resources for that homepage bundle. Am I supposed to explicitly define the resources as a metadata in the index.md
file of that bundle? I’m hoping to retrieve other page resources such as contact-us
.