Files
hugo-theme-stack/layouts/_partials/article/components/header.html
T
JimmyandGitHub 067bcdb370 refactor: image handling logic + support for external images (#1235)
* refactor: simplify image partial logic, remove generation of different image sizes

* Remove `defaultImage.opengraph` configuration from `params.toml`.
2026-01-25 23:29:41 +01:00

13 lines
515 B
HTML

<header class="article-header">
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
{{ if $image }}
<div class="article-image">
<a href="{{ .RelPermalink }}">
<img src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" loading="lazy"
alt="Featured image of post {{ .Title }}" />
</a>
</div>
{{ end }}
{{ partialCached "article/components/details" . .RelPermalink }}
</header>