追光日记

站在巨人的肩上

注意文本框

设置

1
2
3
4
5
6
7
8
9
10
11
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
# 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

用法

1
2
3
{% note [class] [no-icon] [summary] %}
Any content (support inline tags too).
{% endnote %}
  • [class]: 可选参数,支持的值: default | primary | success | info | warning | danger
  • [no-icon]: 可选参数,是否显示图标。
  • [summary]: 可选参数,可选的说明摘要

所有参数都是可选的。

例子

没有定义任何样式

1
2
3
{% note %}
#### Header
{% endnote %}

默认样式

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

Default Header

Welcome to Hexo!

基本样式

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

Primary Header

Welcome to Hexo!

信息样式

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

Info Header

Welcome to Hexo!

成功样式

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

Success Header

Welcome to Hexo!

警告样式

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

Warning Header

Welcome to Hexo!

危险样式

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

Danger Header

Welcome to Hexo!

没有图标的注意样式

1
2
3
4
{% note info no-icon %}
#### No icon note
Note **without** icon: `note info no-icon`
{% endnote %}

No icon note

Note without icon: note info no-icon

折叠样式

基本

1
2
3
4
{% note primary This is a summary %}
#### Details and summary
Note with summary: `note primary This is a summary`
{% endnote %}

This is a summary

Details and summary

Note with summary: note primary This is a summary

无图标

1
2
3
4
{% note info no-icon This is a summary %}
#### Details and summary (No icon)
Note with summary: `note info no-icon This is a summary`
{% endnote %}

This is a summary

Details and summary (No icon)

Note with summary: note info no-icon This is a summary

嵌套样式(代码块)

1
2
3
4
5
6
7
8
{% note success %}
#### Codeblock in note
```
code block in note tag
code block in note tag
code block in note tag
```
{% endnote %}

Codeblock in note

1
2
3
code block in note tag
code block in note tag
code block in note tag

嵌套样式(列表)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{% 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

嵌套样式(表格)

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

Table in Note

1 2
3 4
5 6
7 8