huixisheng / huixisheng.github.com

前端开发者说,记录前端的故事
http://huixisheng.github.io/
12 stars 3 forks source link

markdown生成目录 Table of Contents #13

Closed huixisheng closed 7 years ago

huixisheng commented 8 years ago

gh-md-toc

gh-md-toc

安装

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

生成内容

Table of Contents
=================

    * [gh-md-toc](#gh-md-toc)
      * [安装](#安装)
      * [生成内容](#生成内容)
    * [doctoc](#doctoc)
      * [安装](#安装-1)
      * [控制插入的位置](#控制插入的位置)
      * [支持的平台](#支持的平台)

doctoc

doctoc

安装

$ sudo npm install -g doctoc
$ doctoc ./issue-13.md

生成内容见顶部

控制插入的位置

<!-- START doctoc -->
<!-- END doctoc -->

支持的平台

--bitbucket bitbucket.org
--nodejs    nodejs.org
--github    github.com
--gitlab    gitlab.com
--ghost     ghost.org
huixisheng commented 7 years ago

整理到博客中