title: Icarus用户指南 - 其他插件
date: 2016-01-01
categories:
- Plugins
- Other
tags:
- Icarus用户指南
language: zh-CN
toc: true
providers:
cdn: loli
fontcdn: loli
iconcdn: fontawesome
---
本文介绍Icarus 3支持的其他插件的安装配置。
部分下述插件由[ppoffice/hexo-component-inferno](https://github.com/ppoffice/hexo-component-inferno)
提供,它们的配置请以其为准。
## 画廊
**安装指南**
Icarus的画廊插件同时包含了[lightGallery](https://sachinchoolur.github.io/lightGallery/)与
[Justified Gallery](https://miromannino.github.io/Justified-Gallery/)两种插件。
若要启用画廊插件,请将主题配置中`plugins` > `gallery`的值设置为`true`。
{% codeblock themes/icarus/_config.yml lang:yaml %}
plugins:
gallery: true
{% endcodeblock %}
另外,若要使用Justified Gallery,请将你的多个图片包裹在``与`
`的HTML标签对中。
并且如果你使用的是Markdown语法来引用图片的话,请在HTML标签和Markdown之间添加空行。
例如下方的效果预览的Markdown代码为:
{% codeblock "Justified-Gallery-Markdown.md" lang:markdown >folded %}






{% endcodeblock %}
同样,我们也可使用纯HTML来实现Justified Gallery,这样标签之间就不需要添加空行了:
{% codeblock "Justified-Gallery-HTML.md" lang:html >folded %}
{% endcodeblock %}
**效果预览**
下面是Justified Gallery实现的多图片网格化展示。点击其中的任意可另外查看lightGallery的全图展示效果。
> 下面的图片来源于pexel.com






## KaTeX
**安装指南**
你可以使用KaTeX插件来渲染\\(\TeX\\)数学公式。若要启用KaTeX插件,请将主题配置中`plugins` > `katex`的值设置为`true`。
{% codeblock themes/icarus/_config.yml lang:yaml %}
plugins:
katex: true
{% endcodeblock %}
在使用时,请使用`\\(`和`\\)`包裹行内公式,`$$`或`\\[`与`\\]`标签对包裹块状公式。例如:
{% codeblock Some-Post.md lang:markdown >folded %}
这是一个行内公式:\\(ax^2+bx+c=0\\)。
这是一个块状公式:
$$\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\cdots} } } }$$
这是另一个块状公式:
\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)e^{2 \pi i \xi x}d\xi\\]
{% endcodeblock %}
## MathJax
**安装指南**
你可以使用MathJax插件来渲染\\(\TeX\\),MathML,或AsciiMath数学公式。若要启用MathJax插件,请将主题配置中`plugins` > `mathjax`的值设置为`true`。
{% codeblock themes/icarus/_config.yml lang:yaml %}
plugins:
mathjax: true
{% endcodeblock %}
当使用\\(\TeX\\)语法时,请使用`$`或`\\(`与`\\)`包裹行内公式,`$$`或`\\[`与`\\]`标签对包裹块状公式。或者使用\\(\LaTeX\\)环境。例如:
{% codeblock Tex-Example.md lang:markdown >folded %}
这是一个行内公式:\\(ax^2+bx+c=0\\)。这是另一个行内公式:$ax^2+bx+c>0$。
这是一个块状公式:
$$\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\cdots} } } }$$
这是另一个块状公式:
\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)e^{2 \pi i \xi x}d\xi\\]
或者使用\\(\LaTeX\\)环境:
\\begin{equation}
A =
\\begin{bmatrix}
a & b \\\\
c & c
\\end{bmatrix}
\\end{equation}
{% endcodeblock %}
或者直接使用MathML语法。例如:
{% codeblock MathML-Example.md lang:html >folded %}
当
,
方程
有两个解,它们是
{% endcodeblock %}
同样MathJax也支持AsciiMath,公式使用\\`
包裹。
{% codeblock AsciiMath-Example.md lang:markdown >folded %}
当\`a != 0\`,方程\`ax^2 + bx + c = 0\`有两个解,它们是\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.
{% endcodeblock %}
**效果预览(\\(\TeX\\) & \\(\LaTeX\\))**
这是一个行内公式:\\(ax^2+bx+c=0\\)。这是另一个行内公式:$ax^2+bx+c>0$。
这是一个块状公式:
$$\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}} {1+\cdots} } } }$$
这是另一个块状公式:
\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)e^{2 \pi i \xi x}d\xi\\]
或者使用\\(\LaTeX\\)环境:
\\begin{equation}
A =
\\begin{bmatrix}
a & b \\\\
c & c
\\end{bmatrix}
\\end{equation}
**效果预览(MathML)**
当
,
方程
有两个解,它们是
**效果预览(AsciiMath)**
当\`a != 0\`,方程\`ax^2 + bx + c = 0\`有两个解,它们是\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.
## 浏览器升级提醒 (Outdated Browser)
**安装指南**
你可以开启浏览器升级提醒(Outdated Browser)来提醒使用老旧浏览器的网站访客升级浏览器。
若要启用此插件,请将主题配置中`plugins` > `outdated_browser`的值设置为`true`。
点击[此处](https://bestvpn.org/outdatedbrowser/en)即可预览插件开启效果。
{% codeblock themes/icarus/_config.yml lang:yaml %}
plugins:
outdated_browser: true
{% endcodeblock %}
## 网页载入动画
**安装指南**
Icarus默认启用网页载入动画,若需禁止载入动画,请将`plugins` > `animejs`的值设置为`false`。
{% codeblock themes/icarus/_config.yml lang:yaml %}
plugins:
animejs: false
{% endcodeblock %}
另外,若需隐藏网页载入进度条,请将`plugins` > `progressbar`的值设置为`false`。
{% codeblock themes/icarus/_config.yml lang:yaml %}
plugins:
progressbar: false
{% endcodeblock %}