Shortcodes
Callouts and tabs — the two components Markdown cannot express.
On this page
Callout
md
{{< callout type="warning" >}}
This operation cannot be undone.
{{< /callout >}}| Attribute | Values |
|---|---|
type | note, tip, important, warning, caution |
title | Optional; defaults to the capitalised type |
All five types:
Note
Background a reader can skip without missing anything.
Tip
A shortcut that makes the task easier.
Important
Something the reader must not miss to succeed.
Warning
A likely mistake and how it goes wrong.
Data loss
An action with consequences that cannot be reversed.
Callout bodies are full Markdown — lists, links and code blocks all work inside them.
Tabs
md
{{< tabs >}}
{{< tab "pnpm" >}}
```bash
pnpm add tartarus
```
{{< /tab >}}
{{< tab "npm" >}}
```bash
npm install tartarus
```
{{< /tab >}}
{{< /tabs >}}Rendered:
bash
pnpm add tartarusbash
npm install tartarusbash
yarn add tartarusTabs are a real tablist: ← and → move between them,
Home and End jump to the ends, and each panel is labelled by
its tab.
Code block attributes
Fenced code blocks accept Hugo's highlight options, plus a title that replaces
the language label:
md
```go {title="main.go"}
package main
```main.go
package main
func main() {
println("Tartarus")
}