Create a partial for auto-generating video pages.

This commit is contained in:
2025-12-24 15:03:39 -07:00
parent 1268e5b697
commit 923d1848ab
4 changed files with 26 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
{{ $src := .Param "video_url"
}}{{ $width := .Param "video_width" | default (.Param "odyseeVideoWidthPercentage") }}
<iframe
id="odysee-iframe"
style="width:{{ $width }}%; aspect-ratio:16 / 9;"
src="{{ $src }}"
allowfullscreen>
</iframe>
<br>
{{ with .Params.video_desc }}
{{ range . -}}
<p>
{{ . }}
</p>
{{ end }}
{{ end }}

View File

@@ -64,6 +64,9 @@
<div class="post-content">
{{ .Content }}
{{ if .Params.video }}
{{ partial "odysee.html" . }}
{{ end }}
</div>
</article>