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

后端 未结 9 631
孤城傲影
孤城傲影 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条回答
  •  猫巷女王i
    2021-01-30 02:24

    Currently it's not possible to do that using markdown syntax (.md). There is ongoing unofficial discussion about automatically generating table of contents TOC on rendered markdown files like README.md which lists some of the ideas.

    However there are some other workarounds such as:

    • Use AsciiDoc instead as per suggestion from this comment. For example:

      :toc: macro
      :toc-title:
      :toclevels: 99
      # Title
      
      toc::[]
      
      ## A
      
      ### A2
      
      ## B
      
      ### B2
      

      Check the example at littlebits/react-popover (README.adoc).

    • Online Table Of Content Generator (raychenon/play-table-of-contents)

    • arthurhammer/github-toc - browser extension that adds a table of contents to GitHub repos

提交回复
热议问题