feat: support leaf bundles for blog posts, refactor header images

This commit is contained in:
2026-02-12 21:39:21 +01:00
parent 74ac93d349
commit 3cb1797091
16 changed files with 60 additions and 30 deletions

View File

@@ -0,0 +1,15 @@
{{- $page := . -}}
{{- with $page.Params.headerimage }}
<div class="header-image">
{{- if eq $page.BundleType "leaf" }}
{{- with $page.Resources.GetMatch .src }}
<img src="{{ .RelPermalink }}" />
{{- end }}
{{- else }}
{{- with resources.GetMatch (printf "**/%s" .src) }}
<img src="{{ .RelPermalink }}" />
{{- end }}
{{- end }}
{{- with .text }}<p>{{ . | markdownify }}</p>{{ end }}
</div>
{{- end }}