Multiple Content parts within the same page

You can mark bundles as headless and use them in the home page:

/content/home_pages

index.md => headless: true
page1.md
page2.md

etc.

And in your home page template:

{{ $bundle := .Site.GetPage "page" "home_pages" }}
{{ range $bundle.Resources.ByType "page"  }}
{{ .Title }}: {{ .Content }}
{{ end }}

The above is totally untested, but should work.

8 Likes