github-flavored-markdown中的自动TOC [英] Automatic TOC in github-flavoured-markdown
问题描述
是否可以使用 Github Flavored Markdown 生成自动目录?
我创建了两个选项来为github-flavored-markdown生成toc:
DocToc命令行工具(源)需要 node.js
安装:
npm install -g doctoc
用法:
doctoc。
将目录添加到当前和所有子文件中的所有降价文件目录。
$ b
DocToc WebApp
如果您想先尝试在线,请转至< a href =http://doctoc.herokuapp.com/> doctoc 网站,
粘贴降价页面的链接,它会生成一个
内容的表格,您可以插入在您的降价文件的顶部。
Github Wikis和Anchors
正如Matthew Flaschen在下面的评论中指出的那样,对于其wiki页面,GitHub以前没有生成 doctoc
取决于。
更新:但是,他们修复了此问题。
Is it possible to generate an automatic Table of Contents using Github Flavoured Markdown?
I created two options to generate a toc for github-flavored-markdown:
DocToc Command Line Tool (source) requires node.js
Installation:npm install -g doctoc
doctoc .
to add table of contents to all markdown files in the current and all sub directories.
DocToc WebApp
If you want to try it online first, go to the doctoc site, paste the link of the markdown page and it will generate a table of content that you can insert at the top of your markdown file.
Github Wikis and Anchors
As Matthew Flaschen pointed out in the comments below, for its wiki pages GitHub previously didn't generate the anchors that doctoc
depends on.
UPDATE: However, they fixed this issue.
这篇关于github-flavored-markdown中的自动TOC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!