Callouts
> [!NOTE] blockquotes, no shortcode involved.A callout is a GitHub / Obsidian style blockquote: > [!TYPE] on the first
line, the body underneath. Use it to lift a prerequisite, a warning or an aside
out of the running text; if a sentence in the prose says it, a callout is not
needed.
Shortest form
Hugo Modules need Go on the machine; an offline archive does not.
Without a title the localized type name is used (“Note” on an English site, 「注意」 on a Chinese one). The source renders as a GitHub callout on GitHub and as a plain blockquote in any other Markdown reader — nothing is ever lost.
Ten types
The first five match GitHub; the other five are semantic types OINK adds. Every type has a default icon and accent colour.
hugo server -D previews drafts.
The floor is Hugo Extended 0.160.1; anything older fails the build outright.
hugo --cleanDestinationDir empties public/.
The first build after deleting resources/_gen is much slower.
Build passed with zero warnings — ship it.
Never commit go.work.
Should the site have comments? See enabling comments.
pgsty.com is a documentation site built from callouts and tables alone.
Documentation is a love letter that you write to your future self.
Type names are case-insensitive.
Custom title
Text after the marker on the same line becomes the title and accepts inline Markdown — code, bold, links.
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 page-level Markdown: lists, fenced code, tables, images, nested
callouts. Every line starts with >, fences included.
- Clone:
git clone https://github.com/pgsty/oink.pgsty.com my-docs - Enter the directory and preview:
- Open http://localhost:1313/
| Port | Purpose |
|---|---|
| 1313 | Hugo development server |
Collapsing
A - after the type starts the callout closed, a + starts it open. Both
render as a native <details>; no JavaScript is loaded. Use them for full
command output, alternatives, background — anything that need not be visible by
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 without a semantic colour: closed by default,
[!DETAILS]+ open. Use it for long output, whole configuration files, anything
that has to be foldable.
Full hugo version output
Custom icon
The line right after the blockquote can carry {icon="fa-solid fa-xxx"} — one
Font Awesome class pair — replacing the type’s default icon. The attribute line
must follow the blockquote immediately, with no blank line between them.
Pigsty v4 installs PostgreSQL 18 by default.
Nesting
Callouts nest (one more > per level) and can sit inside list items or steps.
One level of nesting is plenty.
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
An unknown type name neither fails the build nor loses content: the block
renders as an ordinary blockquote with the [!TYPE] marker still visible.
[!NOTICE] Not a valid type
The marker stays on the page to tell you so.
Other things that bite:
- Title merged into the body. In files that pass through Prettier and friends,
keep an empty
>line under the title line, or the formatter folds the title into the body. - Attribute line moved by a formatter. Wrap marker lines such as
{icon=…}in<!-- prettier-ignore-start -->/<!-- prettier-ignore-end -->. style,onclickand friends fail the build: the attribute line acceptsiconandclassonly (see the table below).
Output
| Output | Shape |
|---|---|
| HTML | Static types are <div class="td-callout" role="note">; collapsible types are a native <details> + <summary> |
All static and expanded; disclosures carry a data-td-callout-collapsible marker |
|
| Markdown | The source blockquote is preserved, [!TYPE] marker and title included |
| RSS | Same as print — static and expanded |
Callouts load no script.
Parameter reference
The marker line > [!TYPE]± Title:
The attribute line {…}, immediately after the blockquote:
style, on* and any other key fail the build.
Limits
- Colours cannot be customized: the type decides. When you need a new meaning, pick the closest type and write your own title.
- The collapsed state is not persisted.
- Callouts work inside
{.steps}list items and{{% steps %}}steps (see Steps); every line of the blockquote starts with>and lines up with the list item’s indent.
Related
- Steps — callouts inside a procedure
- Tabs — the same note split per platform
- Writing pages — when to use a callout and when to use prose