mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-05-25 01:55:15 +00:00
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
51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
# Tabs
|
|
|
|
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 >}}
|
|
|
|
{{% tab "MacOS" %}}
|
|
# MacOS
|
|
|
|
This is tab **MacOS** content.
|
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
|
Miseratus fonte Ditis conubia.
|
|
{{% /tab %}}
|
|
|
|
{{% tab "Linux" %}}
|
|
# Linux
|
|
|
|
This is tab **Linux** content.
|
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
|
Miseratus fonte Ditis conubia.
|
|
{{% /tab %}}
|
|
|
|
{{% tab "Windows" %}}
|
|
# Windows
|
|
|
|
This is tab **Windows** content.
|
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
|
Miseratus fonte Ditis conubia.
|
|
{{% /tab %}}
|
|
|
|
{{< /tabs >}}
|