Extended Shortcode - Admonition

Contents

The admonition shortcode allows you to add various types of callouts to your content.

Tip

This is an extended shortcode provided by the FixIt theme.
For better cross-platform compatibility, the Alerts Markdown extension syntax is recommended.

Parameters

The admonition shortcode has the following named parameters, and the positional parameters ordered from top to bottom:

ParameterDescriptionTypeDefault
typeThe type of the admonition banner. See Supported typesstringnote
titleThe title of the admonition banner. (Markdown and HTML support)stringtype identifier
openWhether the content will be expandable by default.booleantrue

Basic Usage

Example admonition input:

1
2
3
4
5
6
7
{{< admonition type=quote title="[FixIt](https://github.com/hugo-fixit/FixIt)" open=true >}}
A **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
{{< /admonition >}}
Or
{{< admonition quote "[FixIt](https://github.com/hugo-fixit/FixIt)" true >}}
A **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
{{< /admonition >}}

The rendered output looks like this:

A clean, elegant but advanced blog theme for Hugo.

Supported types

The admonition shortcode supports 13 types of banners, Unless you Customize admonitions, any unsupported type defaults to the note type. The type identifier is case-insensitive.

The complete examples are as follows:

Note
{{< admonition >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}
Abstract
{{< admonition abstract >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Aliases: summary, tldr

Info
{{< admonition info >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}
Todo

FixIt 0.3.13 | NEW

{{< admonition todo >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}
Tip
{{< admonition tip >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Aliases: hint, important

Success
{{< admonition success >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Aliases: check, done

Question
{{< admonition question >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Aliases: help, faq

Warning
{{< admonition warning >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Aliases: caution, attention

Failure
{{< admonition failure >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Aliases: fail, missing

Danger
{{< admonition danger >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Alias: error

Bug
{{< admonition bug >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}
Example
{{< admonition example >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}
Quote
{{< admonition quote >}}
The quick brown fox jumps over the lazy dog.
{{< /admonition >}}

Alias: cite


Related Content

Buy me a coffee
Lruihao AlipayAlipay
Lruihao WeChat PayWeChat Pay

Update Available

A new version of this site is available.