三种方法:

NO.3

粗暴简单:直接写HTML内容即可。(注意:Html 内容不要添加 换行/回车,否则Markdown会自动转义为</br>

NO.2

使用Hexo中的忽略Markdown编译的标签:

<escape></escape>,解析在这里
使用方法:

1
2
3
<escape>
内容爱写啥写啥,反正原文返回
</escape>

NO.1(推荐,有助于了解Hexo标签机制; 此方法依然会解析为 NO.2)

使用Hexo 自定义标签:(这里需要自定义)
保存路径:.\themes\next\scripts\tags\ignore.js

1
2
3
4
5
6
7
8
9
/* global hexo */
// Usage: {% ignore %} Something {% endignore %}

function ignore (args, content) {
return content;
}

hexo.extend.tag.register('ignore', ignore, {ends: true});
hexo.extend.tag.register('ig', ignore, {ends: true});

使用方法:

1
2
3
4
5
{% ig %}内容{% endig %}

{% ignore %}
内容爱写啥写啥,反正不编译
{% endignore %}