Skip to content

Callouts

Write notes, warnings, and collapsible asides with colors, icons, and titles. Use > [!NOTE] blockquotes without shortcodes.

A callout lifts out the one thing a reader must not miss: a prerequisite, a destructive command, a version limit. It is an ordinary blockquote whose first line is a [!TYPE] marker, the syntax GitHub and Obsidian use, so the same source renders as an alert on GitHub and as a plain quote in any other Markdown reader.

Use them sparingly. When every other paragraph sits in a box, readers stop seeing the boxes, so if a sentence of prose does the job, write the sentence.

Shortest form

Source
> [!NOTE]
> Hugo Modules need Go on the machine; an offline archive does not.
Note

Hugo Modules need Go on the machine; an offline archive does not.

Without a title, the callout shows its type name in the page’s language: “Note” in English, 「说明」 in Chinese.

Ten types

GitHub defines the first five types and OINK adds five more; each has its own icon and color, and type names are case-insensitive. Choose the type by what happens when the reader skips the box: NOTE and TIP are safe to skip, IMPORTANT means the task fails without it, WARNING and CAUTION mean something breaks or slows down, and DANGER marks what cannot be undone.

Source
> [!TIP]
> `hugo server -D` previews drafts.

> [!IMPORTANT]
> Enable Goldmark block attributes in `hugo.yml`, or component attribute lines render as plain text.

> [!WARNING]
> `hugo --cleanDestinationDir` empties `public/`.

> [!CAUTION]
> The first build after deleting `resources/_gen` is much slower.

> [!SUCCESS]
> All 312 pages built; the site is ready to deploy.

> [!DANGER]
> `rm -rf public/` before a deploy also deletes files you placed there by hand.

> [!QUESTION]
> Should the site have comments? See [enabling comments](/docs/admin/comments/).

> [!EXAMPLE]
> `pgsty.com` is a documentation site built from callouts and tables alone.

> [!QUOTE]
> Documentation is a love letter that you write to your future self.
Tip

hugo server -D previews drafts.

Important

Enable Goldmark block attributes in hugo.yml, or component attribute lines render as plain text.

Warning

hugo --cleanDestinationDir empties public/.

Caution

The first build after deleting resources/_gen is much slower.

Success

All 312 pages built; the site is ready to deploy.

Danger

rm -rf public/ before a deploy also deletes files you placed there by hand.

Question

Should the site have comments? See enabling comments.

Example

pgsty.com is a documentation site built from callouts and tables alone.

Quote

Documentation is a love letter that you write to your future self.

Custom title

Text after the marker on the same line becomes the title, and it may contain inline code, bold text and links.

Source
> [!WARNING] Rewrites `public/`
> Check that `baseURL` points at the production domain before a production
> build, or every absolute link will be wrong.
Rewrites public/

Check that baseURL points at the production domain before a production build, or every absolute link will be wrong.

Body content

The body is ordinary Markdown: lists, fenced code, tables, images, even another callout. Every line starts with >, fence lines included.

Source
> [!TIP] Three commands to a live preview
>
> 1. Clone: `git clone https://github.com/pgsty/oink-starter my-docs`
> 2. Enter the directory and preview:
>    ```bash
>    cd my-docs && hugo server
>    ```
> 3. Open <http://localhost:1313/>
>
> | Port | Purpose |
> | --- | --- |
> | 1313 | Hugo development server |
Three commands to a live preview
  1. Clone: git clone https://github.com/pgsty/oink-starter my-docs
  2. Enter the directory and preview:
    cd my-docs && hugo server
  3. Open http://localhost:1313/
Port Purpose
1313 Hugo development server

Collapsing

Put - after the type to render the callout closed, or + to render it open with a toggle. Either way it is a native <details> element that works without JavaScript. Fold what most readers can skip: full command output, an alternative procedure, background reading.

Source
> [!NOTE]- Why is Go needed?
> Hugo downloads themes through Go's module system (`hugo mod get`). A submodule
> or an offline archive works without Go installed.

> [!TIP]+ Open by default, but the reader can close it
> The closed state is not remembered; a reload returns to the default.
Why is Go needed?

Hugo downloads themes through Go’s module system (hugo mod get). A submodule or an offline archive works without Go installed.

Open by default, but the reader can close it

The closed state is not remembered; a reload returns to the default.

The neutral disclosure, DETAILS

[!DETAILS] is a disclosure with no color and no icon, closed unless you write [!DETAILS]+. Use it when the content is neither a note nor a warning, just long: a complete configuration file, a full log, or an audio transcript placed right after a player.

Source
> [!DETAILS] Full `hugo version` output
> ```text
> hugo v0.170.1+withdeploy darwin/arm64
> ```
Full hugo version output
hugo v0.170.1+withdeploy darwin/arm64

Custom icon

To replace the type’s icon, put {icon="fa-solid fa-…"} (one Font Awesome class pair) on the line right after the blockquote, with no blank line between them.

Source
> [!TIP] PostgreSQL 18 is supported
> Pigsty v4 installs PostgreSQL 18 by default.
{icon="fa-solid fa-database"}
PostgreSQL 18 is supported

Pigsty v4 installs PostgreSQL 18 by default.

Nesting

Add one > per level. One level is usually enough; deeper nesting is hard to read.

Source
> [!WARNING] Back up before upgrading
> A theme version bump can change how a page renders.
>
> > [!TIP]- How to back up
> > `git tag pre-upgrade` is enough — rolling back is `git checkout pre-upgrade`.
Back up before upgrading

A theme version bump can change how a page renders.

How to back up

git tag pre-upgrade is enough — rolling back is git checkout pre-upgrade.

Unknown types and common slips

A misspelled type does not break the build or lose content. The block renders as a plain blockquote with the marker still visible, so the typo is easy to spot.

Source
> [!NOTICE] Not a valid type
> The marker stays on the page to tell you so.

[!NOTICE] Not a valid type

The marker stays on the page to tell you so.

Formatters such as Prettier cause the other two common slips:

  • They join the title line and the body. Keep an empty > line under the title.
  • They move attribute lines such as {icon=…}. Wrap the callout in <!-- prettier-ignore-start --> and <!-- prettier-ignore-end -->.

Output

Callouts load no script. Print and RSS show every callout expanded, and the page’s Markdown output keeps the original blockquote, marker and title included.

Parameter reference

The marker line > [!TYPE]± Title:

TYPE , enum , default—
NOTE TIP IMPORTANT WARNING CAUTION SUCCESS DANGER QUESTION EXAMPLE QUOTE DETAILS; case-insensitive; an unknown value renders as a plain blockquote
± , - / + / none , defaultnone
- collapses closed, + collapses open; bare DETAILS is closed
Title , inline Markdown , defaultthe localized type name
On the same line as the marker

The attribute line {…}, immediately after the blockquote:

icon , Font Awesome class pair , defaultthe type’s icon
For example fa-solid fa-database; DETAILS has no default icon
class , space-separated classes , default—
Validated class tokens for site CSS; data-* and aria-* pass through

Any other key, style included, is dropped with a build warning. Hugo strips on* handlers before the theme sees them, so they are dropped silently.

Limits

  • The type sets the color; there is no color parameter. When no type fits, take the closest one and let the title carry the meaning.
  • A reader’s open or closed choice is not remembered after a reload.
  • Inside a {.steps} item, indent every > line to the item’s text; inside a {{% steps %}} step, write it unindented. See Steps.
  • Social — > [!SOCIAL] callouts for offline quoted social posts
  • Steps — callouts inside a procedure
  • Tabs — the same note split per platform
  • Writing pages — when to use a callout and when to use prose