NexT 主题的一些新特性

NexT 主题垂涎已久,其具有完备的设置、丰富的第三方嵌入、不局限于 MarkDown 的书写形式,真是一款优秀的主题!瞬间弃用 Yelee 主题投入 NexT 的怀抱。

中心引用

Usage

1
2
3
{% centerquote %}text{% endcenterquote %}
<!-- 或者: -->
{% cq %}text{% endcq %}

Examples

1
{% cq %}鲁迅说:我不喜欢写代码{% endcq %}

鲁迅说:我不喜欢写代码

Tabs

Usage

1
2
3
4
5
{% tabs Unique name, [index] %}
<!-- tab [Tab caption] [@icon] -->
Any content (support inline tags too).
<!-- endtab -->
{% endtabs %}
  • Unique name:这个 tab 块的名字,需保证一个文件中的唯一性。如果名字中有空格,引用时将被替换成 -
  • index:哪一个 tab 被选中,默认不填为 1,填入 -1 表示不选中任何 tab(即折叠状态)。
  • Tab caption:该 tab 的名字,不填时默认使用先 @icon来代替,@icon 也为空时使用 Unique name 来代替。
  • @icon:FontAwesome icon 名称。@iconTab caption 都有时,显示 @icon + Tab caption

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% tabs First Tabs %}
<!-- tab Python2 -->
{% code %}
print "Hello World!"
{% endcode %}
<!-- endtab -->

<!-- tab Python3 -->
{% code %}
print("Hello World!")
{% endcode %}
{% subtabs SubTab %}
<!-- tab @heart -->
**This is heart.**
<!-- endtab -->

<!-- tab @home -->
**This is home.**
<!-- endtab -->
{% endsubtabs %}
<!-- endtab -->
{% endtabs %}
1
print "Hello World!"

1
print("Hello World!")

This is heart.

This is home.

Note

Usage

1
2
3
4
5
6
7
8
{% 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.

Examples

This is blank note!

This is default note!

This is primary note!

This is info note!

This is success note!

This is warning note!

This is danger note!

This is no-icon success note!

Label

Usage

1
2
3
4
{% label [class] @Text %}

[class] : default | primary | success | info | warning | danger.
@Text: If not specified, default class will be selected.

Examples

default primary success info warning danger
1
<mark>highlight</mark>

highlight

Video

Usage

1
{% video url %}

Button

Usage

1
2
3
4
5
6
7
8
9
10
11
{% button url, text, icon [class], [title] %}
<!-- Tag Alias -->
{% btn url, text, icon [class], [title] %}

url : Absolute or relative path to URL.
text : Button text. Required if no icon specified.
icon : FontAwesome icon name (without 'fa-' at the begining). Required if no text specified.
[class] : FontAwesome class(es): fa-fw | fa-lg | fa-2x | fa-3x | fa-4x | fa-5x
Optional parameter.
[title] : Tooltip at mouseover.
Optional parameter.

Examples

1
{% button #Note, Skip to Note, book fa-fw %}
Skip to Note

Group Pictures

一种多张图片的排列组合展示方式,可能以后会用到,就先记录一下吧。

Usage

1
2
3
4
5
6
{% grouppicture [group]-[layout] %}{% endgrouppicture %}
<!-- 或者: -->
{% gp [group]-[layout] %}{% endgp %}

[group] : Total number of pictures to add in the group.
[layout] : Default picture under the group to show.

其中,layout 的数值意义参考这里

Example

1
2
3
4
5
6
7
{% gp 5-2 %}
![](https://d33wubrfki0l68.cloudfront.net/e2ecd9e90ca2a56af8d7be434b7fdc39cbd454c9/da9b7/images/docs/github.png)
![](https://d33wubrfki0l68.cloudfront.net/e2ecd9e90ca2a56af8d7be434b7fdc39cbd454c9/da9b7/images/docs/github.png)
![](https://d33wubrfki0l68.cloudfront.net/e2ecd9e90ca2a56af8d7be434b7fdc39cbd454c9/da9b7/images/docs/github.png)
![](https://d33wubrfki0l68.cloudfront.net/e2ecd9e90ca2a56af8d7be434b7fdc39cbd454c9/da9b7/images/docs/github.png)
![](https://d33wubrfki0l68.cloudfront.net/e2ecd9e90ca2a56af8d7be434b7fdc39cbd454c9/da9b7/images/docs/github.png)
{% endgp %}

公式

1
2
3
4
5
$$
\begin{equation}
e=mc^2
\end{equation}
$$
1
2
3
4
5
6
$$
\begin{align}
\frac{1}{2}&=1/2 \nonumber \\
\frac{1}{3}&=1/3
\end{align}
$$
1
The equation \eqref{eq1} is energy equation.

The equation \eqref{eq1} is energy equation.