引用块:quote
rules:
{% blockquote [author[, source]] [link] [source_link_title] %}
content
{% endblockquote %}
example code:
{% blockquote David Levithan, Wide Awake %}
Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.
{% endblockquote %}
example view:
Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy.
代码块:code
rules:
{% codeblock [title] [lang:language] [url] [link text] %}
code snippet
{% endcodeblock %}
example code:
{% codeblock lang:objc %}
[rectangle setX: 10 y: 10 width: 20 height: 20];
{% endcodeblock %}
example view:
|
|
反引号代码块
rules:
``` [language] [title] [url] [link text] code snippet ```
iframe
rules:
{% iframe url [width] [height] %}
description: 在文章中插入 iframe
Image
rules:
{% img [class names] /path/to/image [width] [height] [title text [alt text]] %}
description: 在文章中插入指定大小的图片
Link
rules:
{% link text url [external] [title] %}
description: 在文章中插入链接,并自动给外部链接添加 target=”_blank” 属性
参考链接:
https://hexo.io/zh-cn/docs/tag-plugins.html
- 本文作者: kriss
- 本文链接: http://www.kriss.pub/2016/06/29/hexo-tag-plugins-rules/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!
