Files
mcg-website/layouts/_partials/func/featured-image.html
T
luxick a58ed0e805 Remove migration tooling and documentation
The import is verified and content/ is now the source of truth, so the
one-shot WordPress importer under tools/ and MIGRATION.md are no longer
needed. Also drops the remaining references to the old site from the
README, config comments and data-file headers.

Build is unchanged: 38 pages, 718 internal links, none broken.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 19:31:02 +02:00

16 lines
452 B
HTML

{{- /*
Resolve a page's featured image to a Resource.
Looks at the `featured` front-matter key first, then falls back to the first
image in the page bundle.
Returns the Resource, or nothing.
*/ -}}
{{- $img := "" -}}
{{- with .Resources.GetMatch (printf "%s" (.Params.featured | default "")) -}}
{{- $img = . -}}
{{- else -}}
{{- with .Resources.ByType "image" -}}
{{- $img = index . 0 -}}
{{- end -}}
{{- end -}}
{{- return $img -}}