Note (Bootstrap Callout)

Settings

next/_config.yml
note:
# Note tag style values:
# - simple bs-callout old alert style. Default.
# - modern bs-callout new (v2-v3) alert style.
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
icons: false
border_radius: 3
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag.
light_bg_offset: 0

Usage

note.js
{% note [class] [no-icon] %}
Any content (support inline tags too.io).
{% endnote %}

[class] : default | primary | success | info | warning | danger.
[no-icon] : Disable icon in note.

All parameters are optional.

Known Issues

It's wrong to write this tag with 1 line if you don't want to see possible bugs.

For example, here is wrong syntax to write content like that:

{% note danger %}note text, note text, note text{% endnote %}

Or like that:

{% note danger %}note text
note text
note text
{% endnote %}

Need to write content at new line, like this:

{% note danger %}
note text, note text, note text
note text, note text, note text
note text, note text, note text
{% endnote %}

Examples

{% note %}
#### Header
(without define class style)
{% endnote %}

(without define class style)

{% note default %}
#### Default Header
Welcome to [Hexo!](https://hexo.io)
{% endnote %}

Default Header

Welcome to Hexo!

{% note primary %}
#### Primary Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Primary Header

Welcome to Hexo!

{% note info %}
### Info Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Info Header

Welcome to Hexo!

{% note success %}
#### Success Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Success Header

Welcome to Hexo!

{% note warning %}
#### Warning Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Warning Header

Welcome to Hexo!

{% note danger %}
#### Danger Header
**Welcome** to [Hexo!](https://hexo.io)
{% endnote %}

Danger Header

Welcome to Hexo!

{% note info no-icon %}
#### No icon note
Note **without** icon: `note info no-icon`
{% code %}
code block in note tag
code block in note tag
code block in note tag
{% endcode %}
{% endnote %}

No icon note

Note without icon: note info no-icon

note info, note info, note info
note info, note info, note info
note info, note info, note info

{% note success %}
#### Codeblock in note
{% code %}
code block in note tag
code block in note tag
code block in note tag
{% endcode %}
{% endnote %}

Codeblock in note

code block in note tag
code block in note tag
code block in note tag
{% note default %}
#### Lists in note
* ul
* ul
* ul
* ul
* ul

1. ol
2. ol
1. ol
2. ol
3. ol
{% endnote %}

Lists in note

  • ul
  • ul
    • ul
    • ul
  • ul
  1. ol
  2. ol
    1. ol
    2. ol
  3. ol
#### Table in Note
{% note default %}
| 1 | 2 |
| - | - |
| 3 | 4 |
| 5 | 6 |
| 7 | 8 |
{% endnote %}

Table in note

12
34
56
78