From 48756d31a3c1cfa43191844eef33f0bb5a3f6a1a Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Mon, 5 Feb 2024 17:33:53 -0600 Subject: [PATCH] convert to using img tags and support video --- README.md.gotmpl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md.gotmpl b/README.md.gotmpl index d61d7d4e..cca61f88 100644 --- a/README.md.gotmpl +++ b/README.md.gotmpl @@ -15,7 +15,7 @@ {{- if $deprecated }}[![deprecated](https://img.shields.io/badge/lifecycle-deprecated-critical?style=for-the-badge)](#deprecated){{ end }} {{- if has (ds "config") "badges" -}} {{- range $badge := (ds "config").badges -}} - {{- printf " [![%s](%s)](%s)" $badge.name $badge.image $badge.url }} + {{- printf " \"%s\"/" $badge.url $badge.image $badge.name }} {{- end }} {{- if (file.Exists ".github/banner.png") -}}

{{- end -}} {{- end }} @@ -75,7 +75,16 @@ We literally have [*hundreds of other terraform modules*][terraform_modules] tha ## Screenshots {{ range $screenshot := (ds "config").screenshots }} -{{ printf "![%s](%s)\n*%s*" $screenshot.name $screenshot.url $screenshot.description }}{{ end }} +{{- if or (reFindAllString "\\.mp4$" $screenshot.url) (reFindAllString "\\.mp4\\?.*" $screenshot.url) -}} + +{{- else -}} +![{{ $screenshot.name }}]({{ $screenshot.url }}) +{{- end -}} +*{{ $screenshot.description }}* +{{ end }} {{- end }} ---