本文介绍Icarus 5支持的其他插件的安装配置。
 
画廊 安装指南 
Icarus的画廊插件同时包含了lightGallery 与
Justified Gallery 两种插件。
若要启用画廊插件,请将主题配置中plugins > gallery的值设置为true。
_config.icarus.yml 此外,若要使用Justified Gallery,请将你的图片包裹在<div class="justified-gallery">与</div>的HTML标签对中。
并且如果你使用的是Markdown语法来引用图片的话,请在HTML标签和Markdown之间添加空行。
例如,下方画廊预览的Markdown代码为:
Justified-Gallery-Markdown.md >folded 1 2 3 4 5 6 7 8 9 10 <div  class ="justified-gallery" >       </div > 
同样,我们也可使用纯HTML来创建Justified Gallery。
这种情况下HTML标签之间就不需要添加空行了:
Justified-Gallery-HTML.md >folded 1 2 3 4 5 6 7 8 <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 > 
效果预览 
下面是Justified Gallery实现的图片网格。
你也可以点击其中的任意图片查看lightGallery的全图展示效果。
 
KaTeX 安装指南 
你可以使用KaTeX插件来渲染\(\TeX\)数学公式。
若要启用KaTeX插件,请将主题配置中plugins > katex的值设置为true。
_config.icarus.yml 请使用\\(和\\)包裹你的行内公式,使用$$或\\[与\\]标签对包裹块状公式。
例如:
Some-Post.md >folded 1 2 3 4 5 6 7 8 9 这是一个行内公式:\\(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\\]  
有时你的\(\TeX\)语法会被错认为Markdown语法而导致公式渲染异常。
例如,下面的公式不会渲染成功,因为其中包含多个_(下划线)而被Markdown渲染器错误的认成Markdown的斜体字语法:
Some-Post.md 1 2 3 $ $ \hat {x}_ {k}=\hat {x}_ {k}^ {-}+K_ {t}\left (y_ {k}\right )$ $ 
在这种情况下,你可以选择转义每个可能导致歧义的字符:
Some-Post.md 1 2 3 $ $ \hat {x}\_ {k}=\hat {x}\_ {k}^ {-}+K\_ {t}\left (y\_ {k}\right )$ $ 
或是简单地将整个公式用一个额外的HTML标签对包裹起来:
Some-Post.md 1 2 3 4 5 <div> $ $ \hat {x}_ {k}=\hat {x}_ {k}^ {-}+K_ {t}\left (y_ {k}\right )$ $ </div> 
MathJax 安装指南 
你可以使用MathJax插件来渲染\(\TeX\),MathML,或AsciiMath数学公式。
若要启用MathJax插件,请将主题配置中plugins > mathjax的值设置为true。
_config.icarus.yml 当使用\(\TeX\)语法时,请使用$或\\(与\\)包裹行内公式,$$或\\[与\\]标签对包裹块状公式。
或者使用\(\LaTeX\)环境。例如:
Tex-Example.md >folded 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 这是一个行内公式:\\(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语法。例如:
MathML-Example.md >folded 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 当 <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 > 
同样地,你也可以使用MathJax支持的AsciiMath。
公式需包裹在\`内。
AsciiMath-Example.md >folded 1 当\`a != 0\` ,方程\`ax^2 + bx + c = 0\` 有两个解,它们是<p  style ="text-align:center" > `x = (-b +- sqrt(b^2-4ac))/(2a)\` .</p >  
有时你的\(\TeX\)语法会被错认为Markdown语法而导致公式渲染异常。
请参照KaTeX 一节来查看解决方案。
效果预览(\(\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)`.
Cookie同意提示 安装指南 
你可以通过启用Cookie同意提示插件来向你的访客展示Cookie同意对话框。
请参考下载Cookie Consent 和Cookie Consent插件文档 来了解每个配置项的细节。
你也可以通过注释掉配置的方式来禁用Cookie同意对话框。
_config.icarus.yml 1 2 3 4 5 6 7 8 9 10 11 12 plugins:     cookie_consent:                   type:  info                   theme:  edgeless                   static:  false                   position:  bottom-left                   policyLink:  'https://www.cookiesandyou.com/'  
浏览器升级提醒 (Outdated Browser) 安装指南 
你可以使用浏览器升级提醒(Outdated Browser)插件来检测你的网站访客使用的老旧浏览器,并提醒他们升级浏览器。
若要启用此插件,请将主题配置中plugins > outdated_browser的值设置为true。
点击此处 即可预览插件开启效果。
_config.icarus.yml 1 2 plugins:     outdated_browser:  true  
网页载入动画 安装指南 
Icarus默认启用网页载入动画。
若需禁止载入动画,请在你的主题配置中将plugins > animejs设置为false。
_config.icarus.yml 1 2 plugins:     animejs:  false  
另外,若需禁用网页载入进度条,请在你的主题配置中将plugins > progressbar设置为false。
_config.icarus.yml 1 2 plugins:     progressbar:  false