List of content on homepage with resources (headless)

structure

content/
├── things/
│   ├── thing-1/
│   │   ├── feature.jpg
│   │   └── index.md
│   ├── thing-2/
│   │   ├── feature.jpg
│   │   └── index.md
│   └── _index.md
└── _index.md  <-- home page

content/things/_index.md

+++
title = 'Things'
date = 2022-04-09T11:13:53-07:00
draft = false
[cascade._build]
  list = 'local'
  publishResources = false
  render = 'never'
+++

layouts/_default/home.html

{{ range (site.GetPage "things").Pages }}
  {{ with .Resources.GetMatch "feature.jpg" }}
    {{ with .Resize "200x webp" }}
      <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
    {{ end }}
  {{ end }}
  <h2>{{ .Title }}</h2>
  {{ .Content }}
{{ end }}
4 Likes