title: 注意事项 date: 2022-04-25 01:32:40 tags: 博客 mermaid: true


关于测试

建议本地调试完毕再上传,无需多commit

hexo clean
hexo g
hexo serser

支持markdown mermaid渲染

{% note info %} 部分主题的渲染的效果并不理想,我建议使用图片. 本主题可以 {% endnote %}

npm install --save hexo-filter-mermaid-diagrams

_config.melody.yml 中加入

mermaid:
   enable: true

在文章的开头加入

<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>mermaid.initialize({startOnLoad:true});</script>

一些常用符号

$\beta$ $\alpha$ $\varepsilon$

Fluid 主题的 Tag

这里的绝对不能错! 错了在hexo g -d阶段会报一个 err: Template render error: (unknown path) 的错误信息,而且不会提示你哪个文件错了,你要自己找,很难受,一定要注意前后符号的对应

{% note success %}

{% note success %}
success
{% endnote %}

{% endnote %}

{% note danger %}

{% note danger %}
danger
{% endnote %}

{% endnote %}

{% note warning %}

{% note warning %}
warning
{% endnote %}

{% endnote %}

{% note info %}

{% note info %}
info
{% endnote %}

{% endnote %}

{% note light %}

{% note info %}
light
{% endnote %}

{% endnote %}

Fulid主题的按钮

{% btn url, text, title %}

{% btn url, text, title %}

组图

{% gi 5 3-2 %}
   ![](https://raw.githubusercontent.com/learner-lu/picbed/master/logo.png)
   ![](https://raw.githubusercontent.com/learner-lu/picbed/master/logo.png)
   ![](https://raw.githubusercontent.com/learner-lu/picbed/master/logo.png)
   ![](https://raw.githubusercontent.com/learner-lu/picbed/master/logo.png)
   ![](https://raw.githubusercontent.com/learner-lu/picbed/master/logo.png)
{% endgi %}

{% gi 5 3-2 %}

{% endgi %}

嵌入视频/音频

markdown-插入HTML

本主题fluid是支持使用iframe插入视频的,通常来说网站上的其他视频都会给嵌入代码.

以嵌入B站视频举例,分享 -> 嵌入代码 -> 复制

{% note warning %} 复制嵌入代码这里有时候经常没复制到剪切板,要留意一下确定复制正确了 {% endnote %}

但是这里会有一个比较坑的点,iframe并不是自适应网页宽度

下面是一个比较好的模板,替换其中的src资源链接就可以了,支持全屏

<iframe width=100% height=450 src="" allowfullscreen scrolling="auto" border="0" frameborder="no" framespacing="0"> </iframe>

mermaid

{% mermaid %} graph LR

a --> b b --> c

{% endmermaid %}

{% mermaid %}
graph LR
   a --> b
   b --> c
{% endmermaid %}

这里不知道为什么好像传统的mermaid的解析方式有点小问题,还是要用{% mermaid %}这种格式的才可以

zood