2019-09-05 23:03:08 +02:00
|
|
|
---
|
|
|
|
weight: 3
|
|
|
|
---
|
|
|
|
|
2019-06-19 10:26:15 +02:00
|
|
|
# Shortcodes
|
2019-06-19 13:58:46 +02:00
|
|
|
|
2019-10-03 18:15:24 +02:00
|
|
|
## Hints
|
2019-05-22 14:37:31 +02:00
|
|
|
|
2019-10-03 18:15:24 +02:00
|
|
|
Hint shortcode can be used as hint/alerts/notification block. There are 3 colors to choose: `info`, `warning` and `danger`.
|
2019-05-22 16:17:55 +02:00
|
|
|
```tpl
|
2019-10-03 18:15:24 +02:00
|
|
|
{{</* hint [info|warning|danger] */>}}
|
|
|
|
**Markdown content**
|
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|
|
|
{{</* /hint */>}}
|
2019-05-22 16:17:55 +02:00
|
|
|
```
|
2019-05-22 14:37:31 +02:00
|
|
|
|
2019-10-03 18:15:24 +02:00
|
|
|
{{< hint info >}}
|
|
|
|
**Markdown content**
|
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|
|
|
{{< /hint >}}
|
2019-05-22 14:37:31 +02:00
|
|
|
|
2019-10-03 18:15:24 +02:00
|
|
|
{{< hint warning >}}
|
|
|
|
**Markdown content**
|
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
|
|
|
{{< /hint >}}
|
2019-05-22 14:37:31 +02:00
|
|
|
|
2019-10-03 18:15:24 +02:00
|
|
|
{{< hint danger >}}
|
|
|
|
**Markdown content**
|
2019-05-22 16:17:55 +02:00
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
|
|
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
2019-10-03 18:15:24 +02:00
|
|
|
{{< /hint >}}
|
2019-05-22 14:37:31 +02:00
|
|
|
|
2019-06-19 10:26:15 +02:00
|
|
|
## Buttons
|
2019-05-27 18:25:58 +02:00
|
|
|
|
|
|
|
```tpl
|
2019-06-11 13:40:50 +02:00
|
|
|
{{</* button relref="/" [class="..."] */>}}Get Home{{</* /button */>}}
|
2019-05-27 18:25:58 +02:00
|
|
|
{{</* button href="https://github.com/alex-shpak/hugo-book" */>}}Contribute{{</* /button */>}}
|
|
|
|
```
|
|
|
|
|
|
|
|
{{< button relref="/" >}}Get Home{{< /button >}}
|
|
|
|
{{< button href="https://github.com/alex-shpak/hugo-book" >}}Contribute{{< /button >}}
|
|
|
|
|
2019-06-19 10:26:15 +02:00
|
|
|
## Tabs
|
2019-05-22 14:37:31 +02:00
|
|
|
|
2019-05-22 16:17:55 +02:00
|
|
|
```tpl
|
|
|
|
{{</* tabs "uniqueid" */>}}
|
|
|
|
{{</* tab "MacOS" */>}} # MacOS Content {{</* /tab */>}}
|
|
|
|
{{</* tab "Linux" */>}} # Linux Content {{</* /tab */>}}
|
|
|
|
{{</* tab "Windows" */>}} # Windows Content {{</* /tab */>}}
|
|
|
|
{{</* /tabs */>}}
|
|
|
|
```
|
|
|
|
|
2019-05-22 14:37:31 +02:00
|
|
|
{{< tabs "uniqueid" >}}
|
|
|
|
{{< 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 >}}
|
2019-05-22 16:17:55 +02:00
|
|
|
|
2019-06-19 10:26:15 +02:00
|
|
|
## Columns
|
2019-05-22 16:17:55 +02:00
|
|
|
|
2019-05-23 16:30:26 +02:00
|
|
|
```html
|
|
|
|
{{</* columns */>}} <!-- begin columns block -->
|
2019-05-22 16:17:55 +02:00
|
|
|
# Left Content
|
2019-05-23 16:30:26 +02:00
|
|
|
Lorem markdownum insigne...
|
|
|
|
|
|
|
|
<---> <!-- magic sparator, between columns -->
|
|
|
|
|
|
|
|
# Mid Content
|
|
|
|
Lorem markdownum insigne...
|
|
|
|
|
|
|
|
<---> <!-- magic sparator, between columns -->
|
|
|
|
|
2019-05-22 16:17:55 +02:00
|
|
|
# Right Content
|
2019-05-23 16:30:26 +02:00
|
|
|
Lorem markdownum insigne...
|
|
|
|
{{</* /columns */>}}
|
2019-05-22 16:17:55 +02:00
|
|
|
```
|
|
|
|
|
2019-05-23 16:30:26 +02:00
|
|
|
{{< columns >}}
|
|
|
|
## Left Content
|
2019-05-22 16:17:55 +02:00
|
|
|
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.
|
2019-05-23 16:30:26 +02:00
|
|
|
|
|
|
|
<--->
|
|
|
|
|
|
|
|
## Mid Content
|
2019-05-22 16:17:55 +02:00
|
|
|
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
|
|
|
stringit, frustra Saturnius uteroque inter!
|
2019-05-23 16:30:26 +02:00
|
|
|
|
|
|
|
<--->
|
|
|
|
|
|
|
|
## Right Content
|
2019-05-22 16:17:55 +02:00
|
|
|
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.
|
2019-05-23 16:30:26 +02:00
|
|
|
{{< /columns >}}
|
|
|
|
|
2019-10-03 18:15:24 +02:00
|
|
|
## Expand shortcode
|
|
|
|
|
|
|
|
Expand shortcode can help to decrease clutter on screen by hiding part of text
|
|
|
|
|
|
|
|
### Default
|
|
|
|
|
|
|
|
```tpl
|
|
|
|
{{</* expand */>}}
|
|
|
|
## Markdown content
|
|
|
|
Lorem markdownum insigne...
|
|
|
|
{{</* /expand */>}}
|
|
|
|
```
|
|
|
|
|
|
|
|
{{< expand >}}
|
|
|
|
## Markdown content
|
|
|
|
Lorem markdownum insigne...
|
|
|
|
{{< /expand >}}
|
|
|
|
|
|
|
|
### With Custom Label
|
|
|
|
|
|
|
|
```tpl
|
|
|
|
{{</* expand "Custom Label" "..." */>}}
|
|
|
|
## Markdown content
|
|
|
|
Lorem markdownum insigne...
|
|
|
|
{{</* /expand */>}}
|
|
|
|
```
|
|
|
|
|
|
|
|
{{< expand "Custom Label" "..." >}}
|
|
|
|
## Markdown 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.
|
|
|
|
{{< /expand >}}
|
2019-05-23 16:30:26 +02:00
|
|
|
|
2019-06-19 10:26:15 +02:00
|
|
|
## Mermaid Chart
|
2019-05-23 16:30:26 +02:00
|
|
|
|
|
|
|
{{< columns >}}
|
|
|
|
```tpl
|
2019-06-11 13:40:50 +02:00
|
|
|
{{</* mermaid [class="text-center"]*/>}}
|
2019-05-23 16:30:26 +02:00
|
|
|
sequenceDiagram
|
|
|
|
Alice->>Bob: Hello Bob, how are you?
|
|
|
|
alt is sick
|
|
|
|
Bob->>Alice: Not so good :(
|
|
|
|
else is well
|
|
|
|
Bob->>Alice: Feeling fresh like a daisy
|
|
|
|
end
|
|
|
|
opt Extra response
|
|
|
|
Bob->>Alice: Thanks for asking
|
|
|
|
end
|
|
|
|
{{</* /mermaid */>}}
|
|
|
|
```
|
|
|
|
|
|
|
|
<--->
|
|
|
|
|
|
|
|
{{< mermaid >}}
|
|
|
|
sequenceDiagram
|
|
|
|
Alice->>Bob: Hello Bob, how are you?
|
|
|
|
alt is sick
|
|
|
|
Bob->>Alice: Not so good :(
|
|
|
|
else is well
|
|
|
|
Bob->>Alice: Feeling fresh like a daisy
|
|
|
|
end
|
|
|
|
opt Extra response
|
|
|
|
Bob->>Alice: Thanks for asking
|
|
|
|
end
|
|
|
|
{{< /mermaid >}}
|
|
|
|
|
|
|
|
{{< /columns >}}
|
2019-08-22 23:59:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
## KaTeX
|
|
|
|
|
|
|
|
{{< columns >}}
|
|
|
|
|
2019-08-23 13:22:11 +02:00
|
|
|
```latex
|
|
|
|
{{</* katex */>}}
|
|
|
|
x = \begin{cases}
|
2019-08-22 23:59:51 +02:00
|
|
|
a &\text{if } b \\
|
|
|
|
c &\text{if } d
|
2019-08-23 13:22:11 +02:00
|
|
|
\end{cases}
|
|
|
|
{{</* /katex */>}}
|
2019-08-22 23:59:51 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
<--->
|
|
|
|
|
|
|
|
{{< katex >}}
|
2019-08-23 13:22:11 +02:00
|
|
|
x = \begin{cases}
|
2019-08-22 23:59:51 +02:00
|
|
|
a &\text{if } b \\
|
|
|
|
c &\text{if } d
|
2019-08-23 13:22:11 +02:00
|
|
|
\end{cases}
|
2019-08-22 23:59:51 +02:00
|
|
|
{{< /katex >}}
|
|
|
|
|
|
|
|
{{< /columns >}}
|
|
|
|
|
|
|
|
|