MarkDown document writing specification
MarkDown
It is increasingly becoming a convenient, efficient and effective document writing format. Especially for developers.
There are two main places to use:
- The project
README.md
file is a project description document that every project should have, which introduces the basic information of the project and the points that need attention. - When blogging, technical or life
But I found that most people's writing is still very non-standard. So let me introduce the places and norms that need to be paid attention to when writing MarkDown. I will not introduce the grammar here, but only the norms.
1. Adding serial numbers to the main directory makes it easier to read
Take my article as an example. If the serial number is not added, readers will not know where they are in the article after digging into the content of a certain title.
## 主目录添加序号更易阅读
## 英文和数字前后应该添加空格
## 连行的文章如何换行
## 按键使用 `<kbd></kbd>` 标签
## 一、主目录添加序号更易阅读
## 二、英文和数字前后应该添加空格
## 三、连行的文章如何换行
## 四、按键使用 `<kbd></kbd>` 标签
2. Spaces should be added before and after English and numbers
Adding spaces before and after letters and numbers will make the article easier to read.
For example, in the following passage, adding spaces before and after English and numbers is the effect
In 2017, I wanted to learn
iOS
and made an immatureiOS
versionapp
. At that time, the diary was stored iniCloud
. It hadapp
the interface of . But it couldn't be used perfectly.
After a long time, I felt that my front-end technology was almost ready in 2019, so I wanted to realize it, and I usedHTML
+ at firstjQuery
.
Later,Vue
after learning enough about , it was changed toHTML
+Vue
. Originally only available on mobile, a PC version interface has been added.
Later, it was greatly changed and changed to a pureVue
mode. At this time, the PC version and the mobile terminal are still on two branches.
After a long time, the mobile and PC versions were integrated together, which is the current version.
If you remove the space, it will feel bad
In 2017, I wanted to learn and
iOS
made an immatureiOS
version by the wayapp
. At that time, the diary was stored iniCloud
, and there wasapp
a new interface, but it could not be used perfectly.
After a long time, I felt that my front-end technology was almost ready in 2019, so I wanted to realize it, and I usedHTML
+ at firstjQuery
.
Later,Vue
when I learned enough about it, I changed it toHTML
+Vue
. Originally only available on the mobile side, the PC version interface was added.
Later, it was greatly changed and changed to a pureVue
mode. At this time, the PC version and the mobile terminal are still on two branches.
After a long time, the mobile and PC versions were integrated together, which is the current version.
3. How to wrap lines in consecutive articles
Or the above paragraph as an example, this is what the markdown document looks like
2017 年的时候想学 `iOS` 了顺便做了个不太成熟的 `iOS` 版 `app`,当时日记是存储在 `iCloud` 中的,有了 `app` 的界面样子,但并不能很完美的使用。
后来过了很久,到 2019 年的时候感觉自己前端技术差不多了,就想把它实现了,最初使用的是 `HTML` + `jQuery`。
后来对 `Vue` 了解的足够多之后,就改成了 `HTML` + `Vue`。最初只有移动端的,添加了 PC 版界面。
再后来就大改了,改成了纯 `Vue` 模式,此时的 PC 版和移动端还是在两个分支上的。
又过了好久,移动端和 PC 两个版本整合到一起,也就是现在的版本。
It is rendered like this
In 2017, I wanted to learn
iOS
and made an immatureiOS
versionapp
. At that time, the diary was stored iniCloud
. It hadapp
the interface of . But it couldn't be used perfectly. After a long time, I felt that my front-end technology was almost ready in 2019, so I wanted to realize it, and I usedHTML
+ at firstjQuery
. Later,Vue
after learning enough about , it was changed toHTML
+Vue
. Originally only available on mobile, a PC version interface has been added. Later, it was greatly changed and changed to a pureVue
mode. At this time, the PC version and the mobile terminal are still on two branches. After a long time, the mobile and PC versions were integrated together, which is the current version.
If you want it to wrap, you need to add [two spaces] after each line
If you want to change paragraphs, you need to add a blank line in the middle of each line.
It appears normally after adding two spaces after each line:
In 2017, I wanted to learn
iOS
and made an immatureiOS
versionapp
. At that time, the diary was stored iniCloud
. It hadapp
the interface of . But it couldn't be used perfectly.
After a long time, I felt that my front-end technology was almost ready in 2019, so I wanted to realize it, and I usedHTML
+ at firstjQuery
.
Later,Vue
after learning enough about , it was changed toHTML
+Vue
. Originally only available on mobile, a PC version interface has been added.
Later, it was greatly changed and changed to a pureVue
mode. At this time, the PC version and the mobile terminal are still on two branches.
After a long time, the mobile and PC versions were integrated together, which is the current version.
4. Button <kbd></kbd>
usage
When writing github
a document, it is often necessary to write a button. In order to highlight it, you can use <kbd></kbd>
this tag to highlight it, for example:
- ctrl + v paste
- ctrl + x cut
- ctrl+ vpaste
- ctrl+ xcut