Created audio.html shortcode for embeded audio in blog posts

This commit is contained in:
2025-01-25 17:51:37 -08:00
parent a8854b3577
commit eba8d52fa8

View File

@@ -0,0 +1,6 @@
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<audio controls preload="{{ .Get "preload" | default "metadata" }}">
{{ with .Get "src" }}<source src="{{ . | relURL }}" type="audio/mpeg">{{ end }}
</audio>
{{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }}
</figure>