博客书写格式测试
简短的总结
博客书写格式测试
命名
命名:YYYY-MM-DD-TITLE.EXTENSION ,放在 _post 路径下
image
图片、视频、音频等媒体我暂时不需要使用,这里省略
Syntax
code
内联代码 inline code part
路径高亮 /path/to/a/file.extend
代码块
1
This is a plaintext code snippet.
行号
除了 plaintext , console , and terminal,所有的语言会默认显示行号,如果需要隐藏,添加 nolineno 在下方:
1
echo 'No more line numbers!'
Mathematics
使能数学公式:
1
2
3
---
math: true
---
Prompts
There are several types of prompts: tip, info, warning, and danger. They can be generated by adding the class prompt-{type} to the blockquote. For example, define a prompt of type info as follows:
Example line for prompt.
Example line for prompt.
警告:操作有风险,请谨慎。
重要:此步骤是必需的。 缺少它会导致功能失效。
这就是如何在Chirpy主题中使用提示框的示例。
code
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end下面是代码块渲染的
1
2
3
4
5
6
7
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end
This post is licensed under CC BY 4.0 by the author.