Giter Club home page Giter Club logo

auto-toc's Introduction

为GitHub README.md 生成目录

使用过GitHub 的应该知道README.md 并不支持 [TOC] 来自动生成目录

GitHub 使用的 Markdown 是 Github Flavored Markdown,简称 GFM

于是找到一个开源的生成 GFM 目录的工具:https://github.com/ekalinin/github-markdown-toc

macOS安装:

$ curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
$ chmod a+x gh-md-toc

远端GitHub README.md

$ ./gh-md-toc https://github.com/wenyhooo/insurance/blob/master/README.md

如果是clone到本地

$ ./gh-md-toc 本地README.md 路径

生成如下:

QQ20200618-112211@2x

然后将========下方内容,复制到你的README.md 文件中

然后就像https://github.com/wenyhooo/insurance 一样完美支持了目录

GitHub Wiki 也同样操作哦 https://github.com/wenyhooo/insurance/wiki

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.