Automatic TOC in github-flavoured-markdown

后端 未结 17 1700
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 09:24

Is it possible to generate an automatic Table of Contents using Github Flavoured Markdown?

17条回答
  •  抹茶落季
    2020-12-12 09:40

    There's now a GitHub Action accomplishing this:

    https://github.com/marketplace/actions/toc-generator

    1. Specify location of TOC (option) e.g. README.md
    
    
    
    1. Setup workflow e.g. .github/workflows/toc.yml
    on: push
    name: TOC Generator
    jobs:
      generateTOC:
        name: TOC Generator
        runs-on: ubuntu-latest
        steps:
          - uses: technote-space/toc-generator@v2
    

提交回复
热议问题