Intro
After hiatus, I decided to continue my random note of my programming experience. Recently I am exploring markdown for filling wiki document in Github. I am used to write in Gitlab, and recently move to Github. I found something interesting when generating the table contents in the md document.
Tools Used
I am using:
- VS Code
- Github
Auto Generate TOC
Honestly I don't know anything about this auto feature. I just have habit to create TOC in every wiki document. I didn't find this feature in Gitlab. So I am curious whether this is Github feature, or VS Code feature.
Following is the step I did to generate the TOC.
- Create Wiki page document for my Github project. Click the
wiki
tab in the project repository. - Clone the wiki repository to your local repository.
- Create heading with
#
forh1
,##
forh2
, and so on. - Move to the beginning of the markdown document.
- Type
Table of Contents
withh1
format. Enter. - Type
-
to start the list. And type the first section with internal link,- [Example](#example)
- Click Enter.
- Save your document.
Voila!! Your TOC will be generated automatically based on heading level you've created.
See the up to date
part? If you update the structure, it will be updated automatically too once you save the document.
I don't know about others, but I really like this auto feature :D
Top comments (0)