Markdown Demo
Markdown Demo
本博客基于hexo,这篇markdown demo用于记录博文内容中可用的全部格式。帮助自己回忆查询,也作为主题的展示。
markdown配置中,用到的主题和插件有: hexo-theme-aurora
, hexo-renderer-markdown-it-plus
, hexo-tag-plantuml
Aurora主题特有的容器
Tips
Normal Tips Container
Custom header
Custom header
- tips content
- tips new line
Warning
Warning!!!
Caution
Danger!!!
Click to see more
Fusce rutrum venenatis eros in hendrerit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam eget risus egestas, aliquet ipsum sed, volutpat tortor. Proin finibus tortor ac mauris finibus rutrum. Nullam tincidunt arcu eu urna ullamcorper, eu ultricies turpis ornare. Morbi id sollicitudin orci. Proin lobortis vehicula nibh a ornare. Cras sodales eu ligula quis fermentum. Proin eu ultrices leo, quis iaculis justo. Sed dictum, nulla sit amet imperdiet commodo, libero sapien semper justo, ut lobortis elit nunc vitae ante. Nullam lobortis odio quam, ac condimentum elit posuere vitae. Sed ornare, odio et rutrum varius, lorem eros gravida urna, in pharetra sapien justo non magna.
- details content
- details new line
console.log('hello world')
插件markdown-it-plus的扩展
hexo-renderer-markdown-it-plus 支持
行间数学公式
其他Extra功能
H20
x2
++inserted++,
Delete , example and😄 😂 😛
toc&anchor(do not explain this)
deflist(似乎支持不是很好,用markdown正常自然段就行)
点击加载更多
Term 1
: Definition 1
Term 2 with inline markup
: Definition 2
{ some code, part of Definition 2 } Third paragraph of definition 2.
abbr(鼠标移上去有提示文字)
*[abbr]: hover this will show you something.
脚注[1]
mark,
==mark==
基础markdown语法
快捷键
- 加粗
Ctrl + B
- 斜体
Ctrl + I
- 引用
Ctrl + Q
- 插入链接
Ctrl + L
- 插入代码
Ctrl + K
- 插入图片
Ctrl + G
- 提升标题
Ctrl + H
- 有序列表
Ctrl + O
- 无序列表
Ctrl + U
- 横线
Ctrl + R
- 撤销
Ctrl + Z
- 重做
Ctrl + Y
段落
Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成格式丰富的HTML页面。 —— 维基百科
使用简单的符号标识不同的标题,将某些文字标记为粗体或者斜体,创建一个 链接 等。
本编辑器支持 Markdown Extra , 扩展了很多好用的功能。具体请参考.
表格
Markdown Extra 表格语法:
项目 | 价格 |
---|---|
Computer | $1600 |
Phone | $12 |
Pipe | $1 |
可以使用冒号来定义对齐方式:
项目 | 价格 | 数量 |
---|---|---|
Computer | 1600 元 | 5 |
Phone | 12 元 | 12 |
Pipe | 1 元 | 234 |
代码块
代码块语法遵循标准markdown代码,例如:
@requires_authorization
def somefunc(param1='', param2=0):
'''A docstring'''
if param1 > param2: # interesting
print 'Greater'
return (param2 - param1 + 1) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
字体颜色
(github中看不到颜色)删除线
Hello
数学公式
行内公式,数学公式为:
。块级公式:
UML 图
Warning
当前vuepress博客没有安装此插件,而是另外插件,下列代码不能正常解析,故只显示代码而非渲染结果。
安装了hexo-tag-plantuml
插件,详细用法参考这篇博文
示例一:
{% plantuml %}
actor Foo1 #red
boundary Foo2 #green
control Foo3 #blue
entity Foo4
database Foo5
collections Foo6
Foo1 -> Foo2 : To boundary
Foo1 -> Foo3 : To control
Foo1 -> Foo4 : To entity
Foo1 -> Foo5 : To database
Foo1 -> Foo6 : To collections
{% endplantuml %}
示例二:
{% plantuml %}
Bob ->x Alice
Bob -> Alice
Bob ->> Alice
Bob -\ Alice
Bob \\- Alice
Bob //-- Alice
Bob ->o Alice
Bob o\\-- Alice
Bob <-> Alice
Bob <->o Alice
{% endplantuml %}
图片显示

footnote ↩︎