hugo-theme-termlite/layouts/partials/page/figures/small.html
Eryn Wells 3248ac51d1 Take an .images list of resources in figures/fullwidth and figures/small
These two templates take a list of resources to operate on. Since these render
image figures, that list is called "images".
2025-08-19 10:02:38 -07:00

12 lines
398 B
HTML

{{- $page := .page -}}
{{- $shouldShowTitle := .shouldShowTitle -}}
{# TODO: Accommodate multiple images here. #}
{{- $resource := index .images 0 -}}
{{- if not $resource }}
{{ errorf "No resource named '%s'. %s" .name .page.Permalink }}
{{ end -}}
{{- if eq $resource.ResourceType "image" -}}
{{ partial "page/figures/small-image.html" (merge . (dict "resource" $resource)) }}
{{- end -}}