hexo+css创建自己的blog(语法手册)

hexo语法使用手册

title: Manual
date: 2017-09-05 15:11:08
updated: 2017-09-05 15:11:08
tags:


注意:因语法问题,有些hexo的效果在segmentfault中无法正常显示。

1. 列表

有序号:
1. 第一点
2. 第二点
3. 第三点

无序号:
* 星号列表
+ 加号列表
- 减号列表

效果:

  1. 第一点

  2. 第二点

  3. 第三点

  • 星号列表

  • 加号列表

  • 减号列表

2. 块注释

> 区块引用

或者:
{% blockquote %}
普通的引用
{% endblockquote %}

嵌套引用
> 一层引用
>> 两层引用

效果:

区块引用

注:blockquote效果不显示
{% blockquote %}
普通的引用
下一行
{% endblockquote %}

一层引用

两层引用

3. 分割线

***
---

效果:



4. 链接

[这是一个绝对路径的链接](https://hexo.io/zh-cn/docs/writing.html)
[这是一个相对路径的链接](/document/2017/08/07/hello-world/)
{% link text url [external] [title] %}
你好,我是{% link 百度 https://www.baidu.com/ 搜索  度娘 %}.

效果:
这是一个绝对路径的链接
这是一个相对路径的链接

注:效果不显示
你好,我是{% link 百度 https://www.baidu.com/ 搜索 度娘 %}.

5. 加粗

**双星加粗**
__双下划线加粗__

效果:
双星加粗
双下划线加粗

6. 斜体

*星号斜体*
_下划线斜体_

效果:
星号斜体
下划线斜体

7. 图片

![图1. 我最爱的炮兵](/document/assert/img.jpg "Title")

![图2. 我的头像](https://sfault-avatar.b0.upaiyun.com/267/966/2679662993-581186b9d2f8a_big64 "Title")

{% img [class names] /path/to/image [width] [height] [title text [alt text]] %}

{% img [box-model] http://weex.apache.org/cn/references/images/css-boxmodel.png 377 340 weex 盒模型 %}

效果:
图1. 我最爱的炮兵

图2. 我的头像

注:效果不显示
{% img [box-model] http://weex.apache.org/cn/ref... 377 340 weex 盒模型 %}

8. 代码

多行代码块使用三个`
单行代码使用一个`
console.log('hello world!')

9. 标题

方法1: - 和 = (任何数量等效)
一级标题
===
二级标题
---

方法2: #
# 一级 H1
## 二级 H2
### 三级 H3
#### 四级 H4
##### 五级 H5
###### 六级 H6

效果:
方法1: - 和 =

一级标题

二级标题

方法2: #

一级

二级

三级

四级
五级
六级

10. jsfiddle

{% jsfiddle shorttag [tabs] [skin] [width] [height] %}

{% jsfiddle stardew/ffnm6Lsd/1/ %}  点击左上角fiddles

注:效果不显示
{% jsfiddle stardew/ffnm6Lsd/1/ %}

11. iframe

{% iframe url [width] [height] %}

{% iframe https://www.baidu.com/ 500 300 %}

注:效果不显示
{% iframe https://www.baidu.com/ 500 300 %}

12. 表格

左左中右对齐


dog | bird | cat
--- | ---- | ---
foo | foo  | foo
bar | bar  | bar
baz | baz  | baz

dog | bird | cat
:---- | :---- | :----
foo | foo  | foo
bar | bar  | bar
baz | baz  | baz

dog | bird | cat
:----: | :----: | :----:
foo | foo  | foo
bar | bar  | bar
baz | baz  | baz

dog | bird | cat
----: | ----: | ----:
foo | foo  | foo
bar | bar  | bar
baz | baz  | baz
dogbirdcat
foofoofoo
barbarbar
bazbazbaz
dogbirdcat
foofoofoo
barbarbar
bazbazbaz
dogbirdcat
foofoofoo
barbarbar
bazbazbaz
dogbirdcat
foofoofoo
barbarbar
bazbazbaz

13. 原生代码

{% raw %}
content
{% endraw %}

或者直接
content

<span class="color-box" style="background:#FF00FF;color:#FF00FF"> yy </span> #FF00FF

注:效果不显示
<span class="color-box" style="background:#FF00FF;color:#FF00FF"> yy </span> #FF00FF

14. 转义

符号转义
!&#33;
" &#34;&quot;
#&#35;
$&#36;
%&#37;
& &#38;&amp;
'&#39;
(&#40;
)&#41;
*&#42;
+&#43;
< &#60;&lt;
=&#61;
> &#62;&gt;
?&#63;
@&#64;
[&#91;
\&#92;
]&#93;
{&#123;
|&#124;
}&#125;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值