hexo+css建立本身的blog(語法手冊)

hexo語法使用手冊

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


注意:因語法問題,有些hexo的效果在segmentfault中沒法正常顯示。html

1. 列表

有序號:
1. 第一點
2. 第二點
3. 第三點

無序號:
* 星號列表
+ 加號列表
- 減號列表

效果:apache

  1. 第一點segmentfault

  2. 第二點weex

  3. 第三點hexo

  • 星號列表url

  • 加號列表spa

  • 減號列表code

2. 塊註釋

> 區塊引用

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

嵌套引用
> 一層引用
>> 兩層引用

效果:htm

區塊引用

注: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
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

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;
相關文章
相關標籤/搜索