From d795b51bd230242ad681506ced45695100d7ba7e Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Mon, 19 Aug 2024 17:42:52 +0200 Subject: [PATCH] snippets: add an hugo snippet for blockquote - Adds a snippet useful when writting markdown content in hugo that helps using a shortcode for a blockquote, with language code, author, title, link and the quoted text. Co-Authored-by: iGor milhit --- my_snippets/markdown.lua | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/my_snippets/markdown.lua b/my_snippets/markdown.lua index f52193f..faee2ac 100644 --- a/my_snippets/markdown.lua +++ b/my_snippets/markdown.lua @@ -216,5 +216,30 @@ return { dscr = "Insert an HTML comment for references, but in French." }, t("") - ) + ), + s( + { + trig="bq", + name = "[hugo] Blockquote shortcode", + dscr="Insert the shortcode for a blockquote used in my HUGO website.", + docstring = "{{< blockquote lang=\"[lang code]\" author=\"[author]\"\n title=\"[title]\"\n link=\"[link]\" >}}\n\n[Quoted text]\n{{< /blockquote >}}." + }, + fmt( + [[ + {{< blockquote lang="{1}" author="{2}" + title="{3}" + link="{4}" >}} + + {5} + {{< /blockquote >}} + ]], + { + i(1, "Lang code"), + i(2, "Author"), + i(3, "Title"), + i(4, "Link"), + i(5, "Quoted text") + } + ) + ), }