preface

It was recently discovered that markdown documents on Github do not support [TOC] automatic directory generation

So how do people create clickable directories on Github?

Then go to Baidu, through the following syntax format to write markdown documents can generate directories

# # directory - [title] one class (level 1 title) - [title] 2 (# 2 title) - (AAA) # (AAA) - (BBB) # (BBB)Copy the code

But what about a lot of headings? Is there a way to automatically generate that format?

And then find a online website ecotrust – Canada. Making. IO/markdown – to… But it does not support Chinese titles!

Final solution

Install the VS plugin named Markdown All in One

How do I generate markDown directories

  1. Install the plugin, go to the corresponding directory of the document, open the Markdown document, and place the cursor where you want to put the directory
  2. Ctrl / Cmd + Shift + p, open the command input box, and enterCreate Table of ContentsPress Enter to generate the directory

  1. Other commands, be interested in trying them out for yourself
  • Update Table of Contents
  • Add/Update section numbers
  • Remove section numbers
  • Toggle code span
  • Toggle code block
  • Print current document to HTML
  • Print documents to HTML
  • Toggle math environment
  • Toggle list (It will cycle through list markers (-, *, +, 1. and 1)))

Did you get it