From 6c86dcfdc65f5b27b71fb6a599c98c8be357ba3d Mon Sep 17 00:00:00 2001 From: "Vadim (vadcx)" <129969897+vadcx@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:17:19 +0200 Subject: [PATCH] Docs: Change tabs shortcode example to permit unsafe=false (#689) The syntax of `{{% code %}}` only expects Markdown inside. That's why it triggers unsafe warning, if used as a shortcode template. Instead the only the top table shortcode should be used as `{{< tabs >}}` to include the HTML, while the user may use only `{{% tab "Name" %}}` inside and be happily restricted to Markdown. https://gohugo.io/methods/page/rendershortcodes/#shortcode-notation https://github.com/InfosecForActivistsTeam/infosec-activists/pull/45 --- exampleSite/content.en/docs/shortcodes/tabs.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exampleSite/content.en/docs/shortcodes/tabs.md b/exampleSite/content.en/docs/shortcodes/tabs.md index 13da867..f7c072e 100644 --- a/exampleSite/content.en/docs/shortcodes/tabs.md +++ b/exampleSite/content.en/docs/shortcodes/tabs.md @@ -3,16 +3,16 @@ Tabs let you organize content by context, for example installation instructions for each supported platform. ```tpl -{{%/* tabs "id" */%}} +{{}} {{%/* tab "MacOS" */%}} # MacOS Content {{%/* /tab */%}} {{%/* tab "Linux" */%}} # Linux Content {{%/* /tab */%}} {{%/* tab "Windows" */%}} # Windows Content {{%/* /tab */%}} -{{%/* /tabs */%}} +{{}} ``` ## Example -{{% tabs %}} +{{< tabs >}} {{% tab "MacOS" %}} # MacOS @@ -47,4 +47,4 @@ protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. Miseratus fonte Ditis conubia. {{% /tab %}} -{{% /tabs %}} +{{< /tabs >}}