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

后端 未结 9 611
孤城傲影
孤城傲影 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:47

    https://github.com/jonschlinkert/markdown-toc

    • git clone your-repo.wiki.git (add the .wiki right before .git to clone the wiki
    • npm i -g markdown-toc
    • Insert (case sensitive) in your wiki's markdown
    • markdown-toc -i my-wiki-markdown.md (-i will edit it in place)
    • Profit

    Update: I think maybe https://github.com/thlorenz/doctoc is more popular now.

提交回复
热议问题