feat(doc): add en & zh-CN other plugins doc
parent
0796cd83d9
commit
17293fa829
|
@ -0,0 +1,340 @@
|
|||
title: Icarus User Guide - Other Plugins
|
||||
date: 2017-01-31
|
||||
categories:
|
||||
- Plugins
|
||||
- Other
|
||||
tags:
|
||||
- Icarus User Guide
|
||||
language: en
|
||||
toc: true
|
||||
---
|
||||
|
||||
<div class="notification is-success is-size-6">
|
||||
This article is also available in: <a href="{% post_path zh-CN/Other-Plugins %}">简体中文</a>.
|
||||
</div>
|
||||
|
||||
This article covers some other plugins supported by Icarus 3.
|
||||
|
||||
<!-- more -->
|
||||
|
||||
<div class="notification is-link is-size-6">
|
||||
|
||||
Some of the following plugins are provided by
|
||||
[ppoffice/hexo-component-inferno](https://github.com/ppoffice/hexo-component-inferno).
|
||||
Please refer to it for configuration details.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## Gallery
|
||||
|
||||
**Installation Guide**
|
||||
|
||||
The gallery plugin of Icarus contains both [lightGallery](https://sachinchoolur.github.io/lightGallery/) and
|
||||
[Justified Gallery](https://miromannino.github.io/Justified-Gallery/) extensions.
|
||||
To enable it, please set `plugins` > `gallery` to `true` in your theme's configuration file.
|
||||
|
||||
{% codeblock themes/icarus/_config.yml lang:yaml %}
|
||||
plugins:
|
||||
gallery: true
|
||||
{% endcodeblock %}
|
||||
|
||||
Additionally, in order to use Justified Gallery, please wrap your images with the `<div class="justified-gallery">`
|
||||
and `</div>` HTML tag pair.
|
||||
Also, if you are using Markdown syntax to include images, please add additional empty lines between the HTMl tags and
|
||||
Markdown tags.
|
||||
For example, the Markdown code of the gallery preview below is
|
||||
|
||||
{% codeblock "Justified-Gallery-Markdown.md" lang:markdown >folded %}
|
||||
<div class="justified-gallery">
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
{% endcodeblock %}
|
||||
|
||||
Meanwhile, we can use pure HTML to create Justified Galleries as well.
|
||||
In this case, we will not need the empty lines between HTML tags.
|
||||
|
||||
{% codeblock "Justified-Gallery-HTML.md" lang:html >folded %}
|
||||
<div class="justified-gallery">
|
||||
<img src="/hexo-theme-icarus/gallery/animals/elephant.jpeg" alt="Elephant" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/dog.jpeg" alt="Dog" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/birds.jpeg" alt="Birds" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/fox.jpeg" alt="Fox" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/horse.jpeg" alt="Horse" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/leopard.jpeg" alt="Leopard" />
|
||||
</div>
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
**Preview**
|
||||
|
||||
Here is an image grid created by Justified Gallery.
|
||||
You can also view the full image using lightGallery by clicking on any image.
|
||||
|
||||
<div class="justified-gallery">
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## KaTeX
|
||||
|
||||
**Installation Guide**
|
||||
|
||||
You can use the KaTeX plugin to render \\(\TeX\\) expressions.
|
||||
To enable KaTeX, please set `plugins` > `katex` to `true` in your theme's configuration file.
|
||||
|
||||
{% codeblock themes/icarus/_config.yml lang:yaml %}
|
||||
plugins:
|
||||
katex: true
|
||||
{% endcodeblock %}
|
||||
|
||||
Please also use `\\(` and `\\)` to wrap your inline expressions and `$$` or `\\[` and `\\]` pair to wrap
|
||||
block expressions.
|
||||
For example,
|
||||
|
||||
{% codeblock Some-Post.md lang:markdown >folded %}
|
||||
This is an inline expression: \\(ax^2+bx+c=0\\).
|
||||
|
||||
This is a block expression:
|
||||
$$\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} } } }$$
|
||||
|
||||
This is another block expression:
|
||||
\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)e^{2 \pi i \xi x}d\xi\\]
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
## MathJax
|
||||
|
||||
**Installation Guide**
|
||||
|
||||
You can use MathJax to render \\(\TeX\\), MathML, or AsciiMath expressions.
|
||||
To enable MathJax, please set `plugins` > `mathjax` to `true` in your theme's configuration file.
|
||||
|
||||
{% codeblock themes/icarus/_config.yml lang:yaml %}
|
||||
plugins:
|
||||
mathjax: true
|
||||
{% endcodeblock %}
|
||||
|
||||
When using the \\(\TeX\\) syntax, please use `$` or `\\(` and `\\)` to wrap your inline expressions and
|
||||
and `$$` or `\\[` and `\\]` pair to wrap block expressions.
|
||||
You can also use \\(\LaTeX\\) environments directly.
|
||||
For example,
|
||||
|
||||
{% codeblock Tex-Example.md lang:markdown >folded %}
|
||||
This is an inline expression: \\(ax^2+bx+c=0\\). This is another inline expression: $ax^2+bx+c>0$.
|
||||
|
||||
This is a block expression:
|
||||
$$\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} } } }$$
|
||||
|
||||
This is another block expression:
|
||||
\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)e^{2 \pi i \xi x}d\xi\\]
|
||||
|
||||
Or use \\(\LaTeX\\) environment:
|
||||
\\begin{equation}
|
||||
A =
|
||||
\\begin{bmatrix}
|
||||
a & b \\\\
|
||||
c & c
|
||||
\\end{bmatrix}
|
||||
\\end{equation}
|
||||
{% endcodeblock %}
|
||||
|
||||
Or you can use MathML syntax.
|
||||
For example,
|
||||
|
||||
{% codeblock MathML-Example.md lang:html >folded %}
|
||||
When
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<mo>≠</mo>
|
||||
<mn>0</mn>
|
||||
</math>,
|
||||
there are two solutions to
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>+</mo>
|
||||
<mi>b</mi>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<mi>c</mi>
|
||||
<mo>=</mo>
|
||||
<mn>0</mn>
|
||||
</math>
|
||||
and they are
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mrow>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<mo>-</mo>
|
||||
<mi>b</mi>
|
||||
<mo>±</mo>
|
||||
<msqrt>
|
||||
<msup>
|
||||
<mi>b</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>-</mo>
|
||||
<mn>4</mn>
|
||||
<mi>a</mi>
|
||||
<mi>c</mi>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mi>a</mi>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
<mtext>.</mtext>
|
||||
</math>
|
||||
{% endcodeblock %}
|
||||
|
||||
Similarly, you can also use AsciiMath supported by MathJax.
|
||||
Expressions should be wrapped in <code>\\`</code> in this case.
|
||||
|
||||
{% codeblock AsciiMath-Example.md lang:markdown >folded %}
|
||||
When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are <p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.</p>
|
||||
{% endcodeblock %}
|
||||
|
||||
**Preview(\\(\TeX\\) & \\(\LaTeX\\))**
|
||||
|
||||
This is an inline expression: \\(ax^2+bx+c=0\\). This is another inline expression: $ax^2+bx+c>0$.
|
||||
|
||||
This is a block expression:
|
||||
$$\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} } } }$$
|
||||
|
||||
This is another block expression:
|
||||
\\[f(x) = \int_{-\infty}^\infty\hat f(\xi)e^{2 \pi i \xi x}d\xi\\]
|
||||
|
||||
Or use \\(\LaTeX\\) environment:
|
||||
\\begin{equation}
|
||||
A =
|
||||
\\begin{bmatrix}
|
||||
a & b \\\\
|
||||
c & c
|
||||
\\end{bmatrix}
|
||||
\\end{equation}
|
||||
|
||||
**Preview(MathML)**
|
||||
|
||||
When
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<mo>≠</mo>
|
||||
<mn>0</mn>
|
||||
</math>,
|
||||
there are two solutions to
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>+</mo>
|
||||
<mi>b</mi>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<mi>c</mi>
|
||||
<mo>=</mo>
|
||||
<mn>0</mn>
|
||||
</math>
|
||||
and they are
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mrow>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<mo>-</mo>
|
||||
<mi>b</mi>
|
||||
<mo>±</mo>
|
||||
<msqrt>
|
||||
<msup>
|
||||
<mi>b</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>-</mo>
|
||||
<mn>4</mn>
|
||||
<mi>a</mi>
|
||||
<mi>c</mi>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mi>a</mi>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
<mtext>.</mtext>
|
||||
</math>
|
||||
|
||||
**Preview(AsciiMath)**
|
||||
|
||||
When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are <p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.</p>
|
||||
|
||||
|
||||
## Outdated Browser
|
||||
|
||||
**Installation Guide**
|
||||
|
||||
You can use the Outdated Browser plugin to detect outdated browsers used by
|
||||
your site's visitors and remind them to upgrade their browsers.
|
||||
To enable it, please set `plugins` > `outdated_browser` to `true` in your theme's configuration file.
|
||||
Click [here](https://bestvpn.org/outdatedbrowser/en) to see a live preview of this plugin.
|
||||
|
||||
{% codeblock themes/icarus/_config.yml lang:yaml %}
|
||||
plugins:
|
||||
outdated_browser: true
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
## Page Loading Animations
|
||||
|
||||
**Installation Guide**
|
||||
|
||||
Page Loading Animations are enabled by Icarus by default.
|
||||
To disable it, please set `plugins` > `animejs` to `false` in your theme's configuration file.
|
||||
|
||||
{% codeblock themes/icarus/_config.yml lang:yaml %}
|
||||
plugins:
|
||||
animejs: false
|
||||
{% endcodeblock %}
|
||||
|
||||
Also, to disable the page loading progressbar, please set `plugins` > `progressbar` to `false` in
|
||||
your theme's configuration file.
|
||||
|
||||
{% codeblock themes/icarus/_config.yml lang:yaml %}
|
||||
plugins:
|
||||
progressbar: false
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
<div class="notification is-warning is-size-6">
|
||||
Something wrong with this article? Click <a href="https://github.com/ppoffice/hexo-theme-icarus/edit/site/source/_posts/en/Other-Plugins.md">here</a> to submit your revision.
|
||||
</div>
|
|
@ -1,44 +0,0 @@
|
|||
title: Gallery Plugin
|
||||
date: 2016-01-31 00:00:01
|
||||
categories:
|
||||
- Plugins
|
||||
- General
|
||||
---
|
||||
|
||||
You can create a gallery by just adding photos in the post, and enable the gallery plugin in the `_config.yml`:
|
||||
|
||||
```yml
|
||||
plugins:
|
||||
gallery: true
|
||||
```
|
||||
<!-- more -->
|
||||
|
||||
Furthermore, you can also use Justified Gallery to display you photos in a grid:
|
||||
|
||||
{% codeblock lang:html HTML + Markdown %}
|
||||
<div class="justified-gallery">
|
||||
<!-- Need an empty line here for the following markdown to be rendered -->
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
</div>
|
||||
{% endcodeblock %}
|
||||
|
||||
{% quote %}
|
||||
The following photos come from <a href="https://www.pexels.com">pexel.com</a>
|
||||
{% endquote %}
|
||||
|
||||
<div class="justified-gallery">
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
</div>
|
|
@ -1,70 +0,0 @@
|
|||
title: MathJax Plugin
|
||||
date: 2016-01-31 00:00:02
|
||||
categories:
|
||||
- Plugins
|
||||
- General
|
||||
tags:
|
||||
thumbnail: /gallery/thumbnails/math.jpg
|
||||
---
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>f</mi><mrow><mo>(</mo><mi>a</mi><mo>)</mo></mrow></mrow><mo>=</mo><mrow><mfrac><mn>1</mn><mrow><mn>2</mn><mi>π</mi><mi>i</mi></mrow></mfrac><msub><mo>∮</mo><mrow><mi>γ</mi></mrow></msub><mfrac><mrow><mi>f</mi><mo>(</mo><mi>z</mi><mo>)</mo></mrow><mrow><mi>z</mi><mo>−</mo><mi>a</mi></mrow></mfrac><mi>d</mi><mi>z</mi></mrow></math>
|
||||
|
||||
### Configuration
|
||||
|
||||
To enable MathJax support, just set `plugins.mathjax = true` in your theme `_config.yml` file.
|
||||
|
||||
```yml
|
||||
# Plugins
|
||||
plugins:
|
||||
...
|
||||
mathjax: true # options: true, false
|
||||
```
|
||||
<!-- more -->
|
||||
For further MathJax configurations, please edit `<theme folder>/layout/plugin/mathjax.ejs`:
|
||||
|
||||
```js
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
MathJax.Hub.Config({
|
||||
// Edit here
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### TeX and LaTeX input
|
||||
> **Attention**: Please be noted that when you write Tex/LaTeX in Markdown files, you need to use escape characters to prevent certain signs from being processed by Markdown interpreter.
|
||||
|
||||
##### Input
|
||||
```
|
||||
When $a \ne 0$, there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
|
||||
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
|
||||
```
|
||||
|
||||
##### Result
|
||||
When $a \ne 0$, there are two solutions to \\(ax^2 + bx + c = 0\\) and they are
|
||||
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
|
||||
|
||||
### MathML input
|
||||
> **Attention**: please be noted that newline characters may be transformed to `<br>` tag by Markdown interpreter and this will interfere with MathML notation. Please write all MathML inline.
|
||||
|
||||
##### Input
|
||||
```
|
||||
When<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><mo>≠</mo><mn>0</mn></math>, there are two solutions to <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo> <mi>b</mi><mi>x</mi><mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0</mn></math> and they are
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi>x</mi> <mo>=</mo><mrow><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow> <mn>2</mn><mi>a</mi> </mrow></mfrac></mrow><mtext>.</mtext></math>
|
||||
```
|
||||
|
||||
##### Result
|
||||
When<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><mo>≠</mo><mn>0</mn></math>, there are two solutions to <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo> <mi>b</mi><mi>x</mi><mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0</mn></math> and they are
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mi>x</mi> <mo>=</mo><mrow><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow> <mn>2</mn><mi>a</mi> </mrow></mfrac></mrow><mtext>.</mtext></math>
|
||||
|
||||
### AsciiMath input
|
||||
> **Attention**: please be noted that when you write AsciiMath in Markdown files, you need to use escape characters to prevent certain signs from being processed by Markdown interpreter.
|
||||
|
||||
##### Input
|
||||
```
|
||||
When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are<p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`</p>
|
||||
```
|
||||
|
||||
##### Result
|
||||
When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are<p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`</p>
|
||||
|
||||
<a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-size:12px;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@jeshoots?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from JESHOOTS.COM"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-1px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M20.8 18.1c0 2.7-2.2 4.8-4.8 4.8s-4.8-2.1-4.8-4.8c0-2.7 2.2-4.8 4.8-4.8 2.7.1 4.8 2.2 4.8 4.8zm11.2-7.4v14.9c0 2.3-1.9 4.3-4.3 4.3h-23.4c-2.4 0-4.3-1.9-4.3-4.3v-15c0-2.3 1.9-4.3 4.3-4.3h3.7l.8-2.3c.4-1.1 1.7-2 2.9-2h8.6c1.2 0 2.5.9 2.9 2l.8 2.4h3.7c2.4 0 4.3 1.9 4.3 4.3zm-8.6 7.5c0-4.1-3.3-7.5-7.5-7.5-4.1 0-7.5 3.4-7.5 7.5s3.3 7.5 7.5 7.5c4.2-.1 7.5-3.4 7.5-7.5z"></path></svg></span><span style="display:inline-block;padding:2px 3px">JESHOOTS.COM</span></a>
|
|
@ -0,0 +1,327 @@
|
|||
title: Icarus用户指南 - 其他插件
|
||||
date: 2016-01-01
|
||||
categories:
|
||||
- Plugins
|
||||
- Other
|
||||
tags:
|
||||
- Icarus用户指南
|
||||
language: zh-CN
|
||||
toc: true
|
||||
providers:
|
||||
cdn: loli
|
||||
fontcdn: loli
|
||||
iconcdn: fontawesome
|
||||
---
|
||||
|
||||
<div class="notification is-success is-size-6">
|
||||
本文同时提供以下语言的翻译:<a href="{% post_path en/Other-Plugins %}">English</a>。
|
||||
</div>
|
||||
|
||||
本文介绍Icarus 3支持的其他插件的安装配置。
|
||||
|
||||
<!-- more -->
|
||||
|
||||
<div class="notification is-link is-size-6">
|
||||
|
||||
部分下述插件由[ppoffice/hexo-component-inferno](https://github.com/ppoffice/hexo-component-inferno)
|
||||
提供,它们的配置请以其为准。
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## 画廊
|
||||
|
||||
**安装指南**
|
||||
|
||||
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,请将你的多个图片包裹在`<div class="justified-gallery">`与`</div>`的HTML标签对中。
|
||||
并且如果你使用的是Markdown语法来引用图片的话,请在HTML标签和Markdown之间添加空行。
|
||||
例如下方的效果预览的Markdown代码为:
|
||||
|
||||
{% codeblock "Justified-Gallery-Markdown.md" lang:markdown >folded %}
|
||||
<div class="justified-gallery">
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
{% endcodeblock %}
|
||||
|
||||
同样,我们也可使用纯HTML来实现Justified Gallery,这样标签之间就不需要添加空行了:
|
||||
|
||||
{% codeblock "Justified-Gallery-HTML.md" lang:html >folded %}
|
||||
<div class="justified-gallery">
|
||||
<img src="/hexo-theme-icarus/gallery/animals/elephant.jpeg" alt="Elephant" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/dog.jpeg" alt="Dog" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/birds.jpeg" alt="Birds" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/fox.jpeg" alt="Fox" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/horse.jpeg" alt="Horse" />
|
||||
<img src="/hexo-theme-icarus/gallery/animals/leopard.jpeg" alt="Leopard" />
|
||||
</div>
|
||||
{% endcodeblock %}
|
||||
|
||||
|
||||
**效果预览**
|
||||
|
||||
下面是Justified Gallery实现的多图片网格化展示。点击其中的任意可另外查看lightGallery的全图展示效果。
|
||||
|
||||
<div class="justified-gallery">
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## 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 %}
|
||||
当
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<mo>≠</mo>
|
||||
<mn>0</mn>
|
||||
</math>,
|
||||
方程
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>+</mo>
|
||||
<mi>b</mi>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<mi>c</mi>
|
||||
<mo>=</mo>
|
||||
<mn>0</mn>
|
||||
</math>
|
||||
有两个解,它们是
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mrow>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<mo>-</mo>
|
||||
<mi>b</mi>
|
||||
<mo>±</mo>
|
||||
<msqrt>
|
||||
<msup>
|
||||
<mi>b</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>-</mo>
|
||||
<mn>4</mn>
|
||||
<mi>a</mi>
|
||||
<mi>c</mi>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mi>a</mi>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
<mtext>.</mtext>
|
||||
</math>
|
||||
{% endcodeblock %}
|
||||
|
||||
同样MathJax也支持AsciiMath,公式使用<code>\\`</code>包裹。
|
||||
|
||||
{% codeblock AsciiMath-Example.md lang:markdown >folded %}
|
||||
当\`a != 0\`,方程\`ax^2 + bx + c = 0\`有两个解,它们是<p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.</p>
|
||||
{% 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)**
|
||||
|
||||
当
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<mo>≠</mo>
|
||||
<mn>0</mn>
|
||||
</math>,
|
||||
方程
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mi>a</mi>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>+</mo>
|
||||
<mi>b</mi>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<mi>c</mi>
|
||||
<mo>=</mo>
|
||||
<mn>0</mn>
|
||||
</math>
|
||||
有两个解,它们是
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mrow>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<mo>-</mo>
|
||||
<mi>b</mi>
|
||||
<mo>±</mo>
|
||||
<msqrt>
|
||||
<msup>
|
||||
<mi>b</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>-</mo>
|
||||
<mn>4</mn>
|
||||
<mi>a</mi>
|
||||
<mi>c</mi>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mi>a</mi>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
<mtext>.</mtext>
|
||||
</math>
|
||||
|
||||
**效果预览(AsciiMath)**
|
||||
|
||||
当\`a != 0\`,方程\`ax^2 + bx + c = 0\`有两个解,它们是<p style="text-align:center">\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.</p>
|
||||
|
||||
|
||||
## 浏览器升级提醒 (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 %}
|
||||
|
||||
|
||||
<div class="notification is-warning is-size-6">
|
||||
文章内容有误?请点击<a href="https://github.com/ppoffice/hexo-theme-icarus/edit/site/source/_posts/zh-CN/Other-Plugins.md">此处</a>提交修改。
|
||||
</div>
|
Loading…
Reference in New Issue