Markdown使用示例

Markdown使用示例

[toc]

1标题


回到顶部

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题

2文本


回到顶部

斜体 斜体2
++下滑线++
粗体 粗体
删除线
==高亮==

3列表


回到顶部

  • 无序列表
  • item1
  • item2
  • item3
  • item4
  • item5
  • item6
  • 有序列表
  1. item1
  2. item2
  3. item3

4引用


回到顶部

这是第一级引用

这是第二级引用

5内嵌代码


回到顶部

  • 单行代码
    int a = 0;

  • 多行代码

    1
    2
    3
    public static void main(String args[]) { 
    System.out.println("Hello World!");
    }

6注释

  • html方法

    1
    2
    <div style='display: none'>注释,不显示</div>
    <!--注释,不显示-->
  • hack方法
    利用markdown的解析原理来实现注释

    1
    2
    3
    4
    5
    6
    [comment]: <> (注释,不显示)
    [comment]: <> (注释,不显示)
    [comment]: <> (注释,不显示)
    [//]: <> (注释,不显示)
    [//]: # (注释,不显示)
    [^_^]: # (注释,不显示)

7链接


回到顶部

  • 普通链接
    百度

  • 图片链接
    Markdown插入代码

图片名称

8表格


回到顶部

第一行为各个列的表名称。
第二行为下面内容的对齐方式,使用冒号:进行标记。两个冒号加上减号 (-) 表示居中,减号后面是:表示居右,默认居左。

cloth price color
衣服 100
鞋子 200

9待办和清单


回到顶部

  • 表示未完成
  • 表示已完成
    • 项目1
    • 项目2

10流程图


回到顶部

流程图分为竖向和横向两大类,竖向包括自上而下和自下而上两种顺序,横向包括从右到左和从左到右两种顺序。
对应语法分别为:graph TB/graph BT/graph RL/graph LR。

  • TB - top bottom(自上而下)

    1
    2
    graph TB
    A-->B
  • BT - bottom top(自下而上)

    1
    2
    graph BT
    A-->B
  • RL - right left(从右到左)

    1
    2
    graph RL
    A-->B
  • LR - left right(从左到右)

    1
    2
    graph LR
    A-->B
  • 示例

    1
    2
    3
    4
    5
    graph TD
    A((开始))-->B(第一步)
    B-->C{判断}
    C-->|是|D[选项1]
    C-->|否|E[选项2]

11序列图


回到顶部

1
2
3
4
5
sequenceDiagram
loop every day
Alice->>John:Hello John,how are you?
John-->>Alice:Great!
end

12甘特图


回到顶部

工作中用甘特图作计划进度表、项目进度表

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid

section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d

section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d

13数学公式


回到顶部

$y=x^2$

Inline math:
$\dfrac{\tfrac{1}{2}[1-(\tfrac{1}{2})^n]}{1-\tfrac{1}{2}}=s_n$

Math block

1
\dfrac{\tfrac{1}{2}[1-(\tfrac{1}{2})^n]}{1-\tfrac{1}{2}}=s_n

14锚点


回到顶部

回到顶部

Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

test_my_site