Quickly generate a directory for Github README.md

Students familiar with Github may know that creating a Repo usually generates a README.md. A good README increases the readability of the code. In addition, the README can often be used as development documentation. The README itself follows the Markdown syntax, but Markdown itself does not have an absolute standard. The rendering method of Github is different from that of some common blogs, which makes it a bit troublesome to use. Here is a tutorial on Github.

GFM Tutorial

GFM tutorial blog address

In fact, most of them are similar to ordinary Markdown, but the syntax of the directory is quite different. Just for the author, I need to create a directory on the document on Github to use, but I don't want to write the syntax of GFM. At this time, I just found some open source code that can be used. Here is a brief introduction to a currently used method.

1 Github+Baidu search results

In fact, there are quite a few solutions (Github Dafa is good).

At that time, I searched on Baidu and found this solution.

ghtoc Github address (pyhon)

ghtoc Blog

2 Solution: gh-md-toc

Later found the artifact gh-md-toc.

gh-md-toc Github address

But this thing is friendly on Mac and Linux, Windows doesn't seem so friendly. But here is also a solution for windows.

It is github-markdown-toc.go.

github-markdown-toc.go Github address

If you have a compilation environment for the GO language (you are again), you can try to compile it yourself, if not, you can directly download the compiled binary file.

binary file

After downloading, it is found that there is no suffix name that cannot be recognized. In fact, this is an exe file, so you only need to violently add .exe to the back to start using it happily.

First copy the README.md file to the root directory of gh-md-toc.exe.

Then hold down the shift key while right-clicking.

Once the Powershell window opens, type directly.

./gh-md-toc.exe README.md

Then just copy and paste this paragraph into README.md.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325983051&siteId=291194637