# Markdown
# Flag
该文件用来测试和展示书写README的各种markdown语法。
GitHub的markdown语法在标准的markdown语法基础上做了扩充,称之为
GitHub Flavored Markdown
。简称GFM
,GFM在GitHub上有广泛应用, 除了README文件外,issues和wiki均支持markdown语法。
- https://daringfireball.net/projects/markdown (opens new window)
- GitHub Flavored Markdown基本撰写和格式语法 (opens new window)
- https://segmentfault.com/markdown (opens new window)
- https://github.com/guodongxiaren/README (opens new window)
- markdown语法大全 (opens new window)
- https://github.com/mattcone/markdown-guide (opens new window)
- https://guides.github.com/features/mastering-markdown (opens new window)
- https://github.com/Olwiba/Kickass-markdown (opens new window)
- Markdeep是Markdown的超集 https://github.com/morgan3d/markdeep (opens new window)
- CommonMark https://github.com/commonmark (opens new window)
- MultiMarkdown https://github.com/fletcher/MultiMarkdown-6 (opens new window)
- Kramdown https://github.com/gettalong/kramdown (opens new window)
- https://github.com/docbook (opens new window)
- reStructuredText https://sourceforge.net/projects/docutils (opens new window)
- https://github.com/pygments/pygments (opens new window)
- https://github.com/sphinx-doc/sphinx (opens new window)
- https://sourceforge.net/projects/epydoc (opens new window)
- https://github.com/numpy/numpydoc (opens new window)
- https://github.com/pycco-docs/pycco (opens new window)
- https://github.com/Python-Markdown/markdown (opens new window)
- https://github.com/jgm/pandoc (opens new window)
- https://github.com/Awes0meM4n/Awes0meM4n.github.io (opens new window)
- 文档转换 https://github.com/topics/converter (opens new window)
- https://github.com/VikParuchuri/marker (opens new window)
- GitHub角落图标 https://github.com/tholman/github-corners (opens new window)
- https://github.com/missive/emoji-mart (opens new window)
- https://github.com/rickstaa/github-emoji-picker (opens new window)
- SVG徽章 https://github.com/badges/shields (opens new window)
- https://github.com/WebpageFX/emoji-cheat-sheet.com (opens new window)
- https://github.com/carloscuesta/gitmoji (opens new window)
- https://github.com/caiyongji/emoji-list (opens new window)
- https://github.com/12313kaihuang/GitHub-Emoji (opens new window)
- https://github.com/liuchengxu/git-commit-emoji-cn (opens new window)
- https://github.com/afeld/emoji-css (opens new window)
- Github 上 emoji 表情的含义及使用规范 (opens new window)
- https://github.com/mkdocs/mkdocs (opens new window)
- https://www.github.com/VectorLogoZone/vectorlogozone (opens new window)
- 转PDF https://github.com/realdennis/md2pdf (opens new window)
- https://github.com/BlueHatbRit/mdpdf (opens new window)
表情(两个冒号包围的字符),比如
:blush:
,可以显示 😊
- 中文文案排版指北:https://github.com/sparanoid/chinese-copywriting-guidelines (opens new window)
- 中英混排文档在线排版工具:https://github.com/CyC2018/Text-Typesetting (opens new window)
# 横线
***
---
___
# 标题
#
一级标题
##
二级标题
###
三级标题
####
四级标题
#####
五级标题
######
六级标题
# 文本
# 普通文本
这是一段普通的文本
# 单行文本
在一行开头加入1个Tab或者4个空格。
Hello,大家好,我是果冻虾仁。
# 文本块
语法1
在连续几行的文本开头加入1个Tab或者4个空格。
欢迎到访
很高兴见到您
祝您,早上好,中午好,下午好,晚安
语法2
使用一对各三个的反引号
该语法也可以实现代码高亮,见代码高亮
欢迎到访
我是C++码农
你可以在知乎、CSDN、简书搜索【果冻虾仁】找到我
# 文字高亮
文字高亮功能能使行内部分文字高亮,使用一对反引号。
也适合做一篇文章的tag
`linux` `网络编程` `socket` `epoll`
效果:
linux
网络编程
socket
epoll
换行
直接回车不能换行,可以在上一行文本后面补两个空格,这样下一行的文本就换行了。
或者就是在两行文本直接加一个空行。也能实现换行效果,不过这个行间距有点大。
# 表格
表格可以指定对齐方式
左对齐 | 居中 | 右对齐 |
---|---|---|
col 3 is | some wordy text | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
# 字体
- 斜体、粗体、删除线
语法 | 效果 |
---|---|
*斜体1* | 斜体1 |
_斜体2_ | 斜体2 |
**粗体1** | 粗体1 |
__粗体2__ | 粗体2 |
这是一个 ~~删除线~~ | 这是一个 |
***斜粗体1*** | 斜粗体1 |
___斜粗体2___ | 斜粗体2 |
***~~斜粗体删除线1~~*** | |
~~***斜粗体删除线2***~~ |
斜体、粗体、删除线可混合使用
# 图片
基本格式:
![alt](URL title)
alt和title即对应HTML中的alt和title属性(都可省略)
- alt表示图片显示失败时的替换文本
- title表示鼠标悬停在图片时的显示文本(注意这里要加引号)
语法 | 效果 |
---|---|
![baidu](http://www.baidu.com/img/bdlogo.gif "百度logo") | |
![](http://www.baidu.com/img/bdlogo.gif) |
# 链接
语法 | 效果 |
---|---|
[我的博客](https://www.bajins.com "悬停显示") | 我的博客 (opens new window) |
[我的博客](https://www.bajins.com) | 我的博客 |
# URL变量
- 定义变量
[var]:https://www.bajins.com
[blog]:https://www.bajins.com "我的博客"
[baidu-logo]:http://www.baidu.com/img/bdlogo.gif "百度logo"
使用变量语法 | 效果 |
---|---|
[使用变量][var] | 使用变量 (opens new window) |
[我的博客][blog] | 我的博客 (opens new window) |
![baidu][baidu-logo] | |
[![baidu-logo]](https://www.baidu.com) | (opens new window) |
# 图片链接
给图片加链接的本质是混合图片显示语法和普通的链接语法。普通的链接中[ ]内部是链接要显示的文本,而图片链接[ ]里面则是要显示的图片。
直接混合两种语法当然可以,但是十分啰嗦,为此我们可以使用URL标识符的形式。
语法 | 效果 |
---|---|
[![weibo](https://weibo.com/favicon.ico)](https://weibo.com) | (opens new window) |
[![][zhihu-logo]](https://www.zhihu.com "知乎") | (opens new window) |
注意,此时鼠标悬停时显示的文字是图片的title,而非链接本身的title了。
# 锚点
其实呢,每一个标题都是一个锚点,和HTML的锚点(
#
)类似,比如[回到顶部](#readme)
回到顶部
不过要注意,标题中的英文字母都被转化为小写字母了。
- 注意
标题中的空格都是转换为
-
,标题中有除字体或字母数字以外的符号时应该在锚点中直接去除后方可跳转
* [获得当前日期+时间`date+time`函数](#获得当前日期时间datetime函数)
## 获得当前日期+时间date+time函数
* [获得当前日期+时间(date+time)函数](#获得当前日期时间datetime函数)
## 获得当前日期+时间(date+time)函数
# 列表
# 无序列表
- 昵称:果冻虾仁
- 别名:隔壁老王
- 英文名:Jelly
# 多级无序列表
- 编程语言
- 脚本语言
- Python
- 脚本语言
# 有序列表
一般效果
就是在数字后面加一个点,再加一个空格。不过看起来起来可能不够明显。
- 面向对象的三个基本特征:
- 封装
- 继承
- 多态
多级有序列表
和无序列表一样,有序列表也有多级结构
- 这是一级的有序列表,数字1还是1
- 这是二级的有序列表,阿拉伯数字在显示的时候变成了罗马数字
- 这是三级的有序列表,数字在显示的时候变成了英文字母
- 这是二级的有序列表,阿拉伯数字在显示的时候变成了罗马数字
# 复选框列表
- [x] 需求分析
- [x] 系统设计
- [x] 详细设计
- [ ] 编码
- [ ] 测试
- [ ] 交付
您可以使用这个功能来标注某个项目各项任务的完成情况。
Tip:
在GitHub的issue中使用该语法是可以实时点击复选框来勾选或解除勾选的,而无需修改issue原文。
# 块引用
# 常用于引用文本
- 文本摘自《深入理解计算机系统》P27
令人吃惊的是,在哪种字节顺序是合适的这个问题上,人们表现得非常情绪化。 实际上术语“little endian”(小端)和“big endian”(大端)出自Jonathan Swift的《格利佛游记》一书, 其中交战的两个派别无法就应该从哪一端打开一个半熟的鸡蛋达成一致。因此,争论沦为关于社会政治的争论。 只要选择了一种规则并且始终如一的坚持,其实对于哪种字节排序的选择都是任意的。
“端”(endian)的起源
以下是Jonathan Swift在1726年关于大小端之争历史的描述:
“……下面我要告诉你的是,Lilliput和Blefuscu这两大强国在过去36个月里一直在苦战。 战争开始是由于以下的原因:我们大家都认为,吃鸡蛋前,原始的方法是打破鸡蛋较大的一端, 可是当今的皇帝的祖父小时候吃鸡蛋,一次按古法打鸡蛋时碰巧将一个手指弄破了,因此他的父亲, 当时的皇帝,就下了一道敕令,命令全体臣民吃鸡蛋时打破较小的一端,违令者重罚。”
# 块引用有多级结构
数据结构
树
二叉树
平衡二叉树
满二叉树
# 代码高亮
在三个反引号后面加上编程语言的名字(如果是配置则为
ini
、conf
、properties
),另起一行开始写代码,最后一行再加上三个反引号。
- https://en.wikipedia.org/wiki/Configuration_file (opens new window)
- https://prismjs.com/#supported-languages (opens new window)
public static void main(String[]args){} //Java
int main(int argc, char *argv[]) //C
echo "hello GitHub" #Bash
document.getElementById("myH1").innerHTML="Welcome to my Homepage"; //javascipt
string &operator+(const string& A,const string& B) //cpp
# diff语法
版本控制的系统中都少不了
diff
的功能,即展示一个文件内容的增加与删除。
GFM中可以显示的展示diff效果。使用绿色表示新增,红色表示删除。
其语法与代码高亮类似,只是在三个反引号后面写
diff
,并且其内容中,以+
开头表示新增,-
开头表示删除。另外还有有!
和#
的语法。
- 效果如下:
+ 人闲桂花落,
- 夜静春山空。
! 月出惊山鸟,
# 时鸣春涧中。
# HTML元素
<code></code>
<pre></pre>
<kdb></kdb>
按钮效果<b></b>
<strong></strong>
<i></i>
<em></em>
<sup></sup>
<sub></sub>
<br/>
<details><summary style="font-size:160%;">点击查看</summary></details>
# 工具
# 输出目录结构
Windows
TREE [drive:][path] [/F] [/A]
- /F 显示每个文件夹中文件的名称。默认是只输出文件夹的名字。
- /A 使用 ASCII 字符,而不使用扩展字符。
生成当前目录下的结构到 test 文件中:
TREE /F >test
Linux
yum install -y tree
安装tree --help
查看使用帮助man tree
查看更详细的参数说明
NodeJS
- https://github.com/derycktse/treer (opens new window)
- https://github.com/JohnByrneRepo/mddir (opens new window)
- https://github.com/zero9527/node-test (opens new window)
# 微信公众号排版
- https://github.com/aclickall/aclickall.github.io (opens new window)
- https://github.com/doocs/md (opens new window)
- https://github.com/phodal/mifa (opens new window)
- https://github.com/mdnice/markdown-nice (opens new window)
- https://github.com/lyricat/wechat-format (opens new window)
- https://github.com/zkqiang/wechat-mdeditor (opens new window)
- https://github.com/dyc87112/online-markdown (opens new window)
- https://github.com/didadi599/wechat-markdown-editor (opens new window)
- wechat-editor (opens new window)
- https://knb.im/mp (opens new window)
- https://github.com/ufologist/wechat-mp-article (opens new window)
- https://github.com/barretlee/online-markdown (opens new window)
- https://github.com/wangduanduan/m2w-transform (opens new window)
- https://github.com/lyricat/wechat-format (opens new window)
- MAC桌面软件 https://github.com/caol64/wenyan (opens new window)
# 表格生成
HTML
表格转Excel
可以直接在office Excel
中点击数据
->自网站
->URL
然后进行操作
- https://tableconvert.com (opens new window)
- https://www.tablesgenerator.com/markdown_tables (opens new window)
- https://markdown-convert.com/zh (opens new window)
- https://github.com/stevecat/table-magic (opens new window)
- https://github.com/jakebathman/Markdown-Table-Generator (opens new window)
- https://github.com/donatj/CsvToMarkdownTable (opens new window)
- https://github.com/jonmagic/copy-excel-paste-markdown (opens new window)
# 生成标题目录树
TOC
https://en.wikipedia.org/wiki/Table_of_contents (opens new window)
- https://github.com/topics/toc (opens new window)
- https://github.com/topics/table-of-contents (opens new window)
- https://github.com/topics/toc-generator (opens new window)
- https://github.com/topics/markdown-toc (opens new window)
- https://github.com/dohliam/tocdown (opens new window)
- markdown-toc-generate (opens new window)
- https://github.com/nochso/tocenize (opens new window)
- https://github.com/thlorenz/doctoc (opens new window)
- https://github.com/dkyaorui/MDToc (opens new window)
- https://github.com/medfreeman/markdown-it-toc-and-anchor (opens new window)
- https://github.com/jonschlinkert/gulp-format-md (opens new window)
- https://github.com/remarkablemark/mdtocs (opens new window)
- https://github.com/luciopaiva/markdown-toc (opens new window)
# 解析库
- https://github.com/topics/markdown (opens new window)
- https://github.com/topics/markdown-to-html (opens new window)
- https://github.com/domchristie/turndown (opens new window)
- https://github.com/markdown-it/markdown-it (opens new window)
- https://github.com/markedjs/marked (opens new window)
- https://github.com/mdnice/markdown-resume (opens new window)
- https://github.com/syfxlin/xkeditor (opens new window)
- https://github.com/pandao/editor.md (opens new window)
- https://github.com/jonschlinkert/remarkable (opens new window)
- https://github.com/benweet/stackedit (opens new window)
- https://github.com/commonmark/commonmark.js (opens new window)
- https://github.com/showdownjs/showdown (opens new window)
- https://github.com/github/markup (opens new window)
- https://github.com/mermaid-js/mermaid (opens new window)
# 在线版客户端
- https://dillinger.io (opens new window)
- https://tool.lu/markdown (opens new window)
- https://github.com/jserme/mahua (opens new window)
- 马克飞象 https://maxiang.io (opens new window)
- Markdown Plus http://mdp.tylingsoft.com (opens new window)
- 小书匠 http://markdown.xiaoshujiang.com (opens new window)
- Cmd Markdown https://www.zybuluo.com/mdeditor (opens new window)
- https://github.com/JP1016/Markdown (opens new window)
- https://github.com/aromalanil/markItDown (opens new window)
- https://github.com/davidfowl/TodoApi (opens new window)
# 本地版客户端
https://github.com/typora (opens new window)- https://github.com/Saul-Mirone/milkdown (opens new window)
- MarkPad https://github.com/Code52/DownmarkerWPF (opens new window)
- Haroopad (opens new window)
- https://github.com/MacDownApp/macdown (opens new window)
- https://github.com/Zettlr/Zettlr (opens new window)
- https://github.com/rickstrahl/MarkdownMonster (opens new window)
- https://github.com/marktext/marktext (opens new window)
- https://obsidian.md (opens new window)
- https://github.com/notable/notable (opens new window)
- https://github.com/nhn/tui.editor (opens new window)
- https://github.com/aguang-xyz/aurora-editor (opens new window)
- https://github.com/1943time/bluestone (opens new window)
- CLI https://github.com/Textualize/frogmouth (opens new window)
- 笔记 https://github.com/laurent22/joplin (opens new window)
- https://github.com/evernote (opens new window)
- https://github.com/leanote (opens new window)
- https://github.com/zadam/trilium (opens new window)
- https://github.com/flxzt/rnote (opens new window)
- https://github.com/pbek/QOwnNotes (opens new window)
- https://github.com/usememos/memos (opens new window)
- https://github.com/standardnotes (opens new window)
- https://github.com/oleeskild/obsidian-digital-garden (opens new window)
- https://github.com/yesmore/inke (opens new window)
- https://github.com/streetwriters/notesnook (opens new window)
- https://github.com/docmost/docmost (opens new window)
- GitBook替代 https://github.com/lindeer/dartbook (opens new window)
- 临时存储 https://github.com/heyman/heynote (opens new window)
- 待办事项 https://github.com/go-vikunja/vikunja (opens new window)
- https://github.com/johannesjo/super-productivity (opens new window)
- 草图 https://frame0.app (opens new window)