From 17293fa82930e7b3611a4b496b1089a4394b1b42 Mon Sep 17 00:00:00 2001 From: ppoffice Date: Sat, 11 Apr 2020 22:13:22 -0400 Subject: [PATCH] feat(doc): add en & zh-CN other plugins doc --- source/_posts/en/Other-Plugins.md | 340 +++++++++++++++++++++++++++ source/_posts/plugin/Gallery.md | 44 ---- source/_posts/plugin/MathJax.md | 70 ------ source/_posts/zh-CN/Other-Plugins.md | 327 ++++++++++++++++++++++++++ 4 files changed, 667 insertions(+), 114 deletions(-) create mode 100644 source/_posts/en/Other-Plugins.md delete mode 100644 source/_posts/plugin/Gallery.md delete mode 100644 source/_posts/plugin/MathJax.md create mode 100644 source/_posts/zh-CN/Other-Plugins.md diff --git a/source/_posts/en/Other-Plugins.md b/source/_posts/en/Other-Plugins.md new file mode 100644 index 0000000..58f4050 --- /dev/null +++ b/source/_posts/en/Other-Plugins.md @@ -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 +--- + +
+This article is also available in: 简体中文. +
+ +This article covers some other plugins supported by Icarus 3. + + + + + + +## 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 `` 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 %} + +{% 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 %} + +{% 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. + + + + +## 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 + + a + + 0 +, +there are two solutions to + + a + + x + 2 + + + + b + x + + + c + = + 0 + +and they are + + x + = + + + + - + b + ± + + + b + 2 + + - + 4 + a + c + + + + 2 + a + + + + . + +{% endcodeblock %} + +Similarly, you can also use AsciiMath supported by MathJax. +Expressions should be wrapped in \\` 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

\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.

+{% 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 + + a + + 0 +, +there are two solutions to + + a + + x + 2 + + + + b + x + + + c + = + 0 + +and they are + + x + = + + + + - + b + ± + + + b + 2 + + - + 4 + a + c + + + + 2 + a + + + + . + + +**Preview(AsciiMath)** + +When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are

\`x = (-b +- sqrt(b^2-4ac))/(2a)\`.

+ + +## 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 %} + + +
+Something wrong with this article? Click here to submit your revision. +
diff --git a/source/_posts/plugin/Gallery.md b/source/_posts/plugin/Gallery.md deleted file mode 100644 index 461ffc1..0000000 --- a/source/_posts/plugin/Gallery.md +++ /dev/null @@ -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 -``` - - -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 --> -![Elephant](/hexo-theme-icarus/gallery/animals/elephant.jpeg) -![Dog](/hexo-theme-icarus/gallery/animals/dog.jpeg) -![Birds](/hexo-theme-icarus/gallery/animals/birds.jpeg) -![Cat](/hexo-theme-icarus/gallery/animals/cat.jpeg) -![Fox](/hexo-theme-icarus/gallery/animals/fox.jpeg) -![Horse](/hexo-theme-icarus/gallery/animals/horse.jpeg) -![Leopard](/hexo-theme-icarus/gallery/animals/leopard.jpeg) -</div> -{% endcodeblock %} - -{% quote %} -The following photos come from pexel.com -{% endquote %} - - \ No newline at end of file diff --git a/source/_posts/plugin/MathJax.md b/source/_posts/plugin/MathJax.md deleted file mode 100644 index 8203009..0000000 --- a/source/_posts/plugin/MathJax.md +++ /dev/null @@ -1,70 +0,0 @@ -title: MathJax Plugin -date: 2016-01-31 00:00:02 -categories: -- Plugins -- General -tags: -thumbnail: /gallery/thumbnails/math.jpg ---- - -f(a)=12πiγf(z)zadz - -### Configuration - -To enable MathJax support, just set `plugins.mathjax = true` in your theme `_config.yml` file. - -```yml -# Plugins -plugins: - ... - mathjax: true # options: true, false -``` - -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 `
` tag by Markdown interpreter and this will interfere with MathML notation. Please write all MathML inline. - -##### Input -``` -Whena0, there are two solutions to ax2+ bx+ c = 0 and they are -x =b±b24ac 2a . -``` - -##### Result -Whena0, there are two solutions to ax2+ bx+ c = 0 and they are -x =b±b24ac 2a . - -### 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

\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`

-``` - -##### Result -When \`a != 0\`, there are two solutions to \`ax^2 + bx + c = 0\` and they are

\`x = (-b +- sqrt(b^2-4ac))/(2a) .\`

- -unsplash-logoJESHOOTS.COM \ No newline at end of file diff --git a/source/_posts/zh-CN/Other-Plugins.md b/source/_posts/zh-CN/Other-Plugins.md new file mode 100644 index 0000000..c97bc50 --- /dev/null +++ b/source/_posts/zh-CN/Other-Plugins.md @@ -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 +--- + +
+本文同时提供以下语言的翻译:English。 +
+ +本文介绍Icarus 3支持的其他插件的安装配置。 + + + + + + +## 画廊 + +**安装指南** + +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的全图展示效果。 + + + + +## 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 %} +当 + + a + + 0 +, +方程 + + a + + x + 2 + + + + b + x + + + c + = + 0 + +有两个解,它们是 + + x + = + + + + - + b + ± + + + b + 2 + + - + 4 + a + c + + + + 2 + a + + + + . + +{% 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)** + +当 + + a + + 0 +, +方程 + + a + + x + 2 + + + + b + x + + + c + = + 0 + +有两个解,它们是 + + x + = + + + + - + b + ± + + + b + 2 + + - + 4 + a + c + + + + 2 + a + + + + . + + +**效果预览(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 %} + + +
+文章内容有误?请点击此处提交修改。 +