hexo模板和测试

记录一些常用的标签、用法,持续更新,作为这个blog的Markdown参考。

摘要是这之前

1
2
3
4
5
6
7
8
9
10
11
title: 
description:
date:
layout: post
comments: ture
categories:
- Others
tags:
- model
- 模板
---

Markdown测试

二级标题

三级标题

四级标题

这里是正文


emoji

https://github.com/crimx/hexo-filter-github-emojis

https://www.webpagefx.com/tools/emoji-cheat-sheet/

🇨🇳sometext 🚌 1⃣ 1⃣ 4⃣ 5⃣ 1⃣ 4⃣


uml

https://github.com/oohcoder/hexo-tag-plantuml

说明
http://plantuml.com/

在线
http://www.plantuml.com/plantuml/uml/

1
2
3
4
5
6
7
8
9
10
11
{% plantuml %}
Bob->Alice : hello
{% endplantuml %}

{% plantuml %}
participant Bob
actor Alice

Bob -> Alice : hello
Alice -> Bob : Is it ok?
{% endplantuml %}

hexo-spoiler

https://github.com/unnamed42/hexo-spoiler

1
{% spoiler sometext %} 
sometext

图片标签

1
{% asset_img test.gif image %}

另一种代码块

1
2
3
{% codeblock lang:c %}
[rectangle setX: 10 y: 10 width: 20 height: 20];
{% endcodeblock %}
1
void (*pfn_dead_fun)(char n) { }

折叠

1
2
3
4
5
6
<details>
<summary>点击时的区域标题</summary>
123
456
789
</details>
点击时的区域标题

  123
  456
  789  
  

插入引用

1
2
3
{% pullquote heheheh %}
这里是某人的名言哦
{% endpullquote %}

这里是某人的名言哦


着重符号

1
2
3
4
5
6
*测试*
**测试**
***测试***
_测试_
__测试__
___测试___

测试
测试
测试
测试
测试
测试


表格

1
2
3
4
5
6
表头1|表头2
---|---|---
内容|内容内容内容内容内容内容
哈哈|呵呵呵呵
1|2
3|4

表头1|表头2
—|—|—
内容|内容内容内容内容内容内容
哈哈|呵呵呵呵
1|2
3|4


iframe

1
{% iframe http://noodlefighter.com/ 400 400 %}

引用文章资源

这个blog做了生成脚本,转换_assets里的图片,会自动转换![](_assets/<title>/xxx.jpg)这样的标签成asset标签

自动管理资源功能
比如_post/note_model.md,对应的的资源文件夹为_post/note_model/

1
2
3
4
5
6
7
8
{% asset_path test.gif %}
{% asset_img test.gif 图片标题 %}
{% asset_link test.gif 链接标题 %}

{% img test.gif 100 %}

{% img {% asset_path test.gif %} 100 %}

/posts/7835/test.gif 链接标题 100 %}

官方文档说asset_img方式可以解决首页显示图片不正常的问题。


绝对路径

1
[测试](http://noodlefighter.com)

测试


相对路径

1
[测试](\hehe)

测试


外部链接

1
{% link 链到焦了家 http://loli.la/ 提示文本 %}
链到焦了家

内部文章链接

1
{% post_link model 自定的标题 %}
Post not found: note_model 自定的标题
1