odysee, only print the fields if they have a proper value set.

This commit is contained in:
me committed 2026-10-26 09:32:55 -07:00
1 parent ada2c63bcc
commit b7f8e4e3d2
1 file changed
+4
+4
View File
@@ -2,8 +2,11 @@
}}{{ $width := .Param "video_width" | default (.Param "odyseeVideoWidthPercentage") }}{{ $width := .Param "video_width" | default (.Param "odyseeVideoWidthPercentage")
}}{{ $url := .Param "video_page" }}{{ $url := .Param "video_page"
}} }}
{{ if $url }}
<p><a href="{{ $url }}" target="_blank" rel="noopener noreferrer">{{ $url | markdownify }}</a></p> <p><a href="{{ $url }}" target="_blank" rel="noopener noreferrer">{{ $url | markdownify }}</a></p>
{{ end }}
{{ if $src }}
<iframe <iframe
id="odysee-iframe" id="odysee-iframe"
style="width:{{ $width }}%; aspect-ratio:16 / 9;" style="width:{{ $width }}%; aspect-ratio:16 / 9;"
@@ -11,6 +14,7 @@
allowfullscreen> allowfullscreen>
</iframe> </iframe>
<br/> <br/>
{{ end }}
{{ with .Params.video_desc }} {{ with .Params.video_desc }}
{{ range . -}} {{ range . -}}