How do I create some kind of table of content in GitHub wiki?

后端 未结 9 703
孤城傲影
孤城傲影 2021-01-30 02:05

If you look here: http://en.wikipedia.org/wiki/Stack_Overflow

You\'ll notice there\'s a little \"Content\" section, if you click on one of the links, it will send you to

9条回答
  •  灰色年华
    2021-01-30 02:28

    If you are not in the position to stick with Markdown, you can do as below:

    • on GitHub/wiki: switch Markdown to MediaWiki. Use __TOC__ Syntax. See sample.
    • on GitHub/repo: switch Markdown to AsciiDoc. Use :toc: Syntax. See demo.

    However, using Markdown files in GitHub/repo, you can get it on GitHub Pages like in Wikipedia

    • when Jekyll is activated, it generates GitHub Pages using Kramdown by default
    • Kramdown comes with Table Of Content. Use {:toc} Syntax. See the explanation.

提交回复
热议问题