Setting up blog post for this week

This commit is contained in:
Dan 2026-01-02 13:33:46 +00:00
parent 3a17c00bf6
commit d5bd747b2e
7 changed files with 117 additions and 6 deletions

View file

@ -0,0 +1,16 @@
<!-- prettier-ignore -->
{{ $src := .Get "src" }}
{{ $alt := .Get "alt" | default "" }}
{{ $width := .Get "width" | default "800x" }}
<figure class="blog-img-container">
{{ with .Page.Resources.GetMatch $src }}
{{ $resized := .Resize $width }}
<img src="{{ $resized.RelPermalink }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
{{ else }}
<img src="{{ $src }}" alt="{{ $alt }}" loading="lazy" class="blog-img" />
{{ end }}
{{ if $alt }}
<figcaption class="blog-img-caption">{{ $alt }}</figcaption>
{{ end }}
</figure>