Finish video embed support

This commit is contained in:
2025-07-27 03:33:25 -05:00
parent f371afe529
commit 486fa65ad6

View File

@@ -6,12 +6,14 @@
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
{{ else if eq .ResourceType "video" }}
<video controls preload="metadata">
{{/* FIXME
<source src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
*/}}
{{ with .Params.alt }}
{{ warnf "video does not support alt text, '%s'" . }}
{{ end }}
<source src="{{ .Permalink }}" />
{{ i18n "browser_no_video_support" }}
<a href="{{ .Permalink }}" target="_blank" rel="noopener">
{{ i18n "browser_no_video_support_link" }}
</a>
</video>
{{ else }}
{{/* TODO: could consider implementing more types, listed at: