From 6799b381bee4fcd917d1e0673a7b13fc78ffd20a Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Wed, 28 Aug 2024 17:25:22 +0200 Subject: [PATCH] snippets: add an hugo snippet for streaming - Adds an HUGO snippet for streaming audio tag. - Improves the existing HUGO snippet with correct brackets escaping. Co-Authored-by: iGor milhit --- my_snippets/markdown.lua | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/my_snippets/markdown.lua b/my_snippets/markdown.lua index faee2ac..0777ebb 100644 --- a/my_snippets/markdown.lua +++ b/my_snippets/markdown.lua @@ -226,12 +226,12 @@ return { }, fmt( [[ - {{< blockquote lang="{1}" author="{2}" + {{{{< blockquote lang="{1}" author="{2}" title="{3}" - link="{4}" >}} + link="{4}" >}}}} {5} - {{< /blockquote >}} + {{{{< /blockquote >}}}} ]], { i(1, "Lang code"), @@ -242,4 +242,37 @@ return { } ) ), + s( + { + trig="st", + name = "[hugo] [St]ream shortcode", + dscr="Insert the shortcode for a streamed live used in my HUGO website.", + docstring = "{{< stream legend=\"[Caption]\" >}}." + }, + fmt( + [[ + {{{{< stream legend="{1} >}}}}" + ]], + { + i(1, "Caption"), + } + ) + ), + s( + { + trig="pl", + name = "[hugo] [P]ublished [L]ive shortcode", + dscr="Insert the shortcode for a published live used in my HUGO website.", + docstring = "{{< published src=\"[source URL]\" legend=\"[Caption]\" >}}." + }, + fmt( + [[ + {{{{< published src="{1}" legend="{2}" >}}}} + ]], + { + i(1, "source URL"), + i(2, "Caption"), + } + ) + ), }