i5ting_toc 是把markdown编译成带有toc目录的html的node模块
i5ting_toc 是把markdown编译成带有toc目录的html的node模块
i5ting_toc
i5ting_toc a node npm wrapper of i5ting_ztree_toc https://github.com/i5ting/i5ting_ztree_toc
Preview
Install
npm install -g i5ting_toc
Usage
➜ tocmd.npm git:(master) ✗ i5ting_toc -h
Usage: i5ting_toc a node npm wrapper of i5ting_ztree_toc https://github.com/i5ting/i5ting_ztree_toc
Options:
-h, --help output usage information
-V, --version output the version number
-f, --file [filename] default is README.md
-o, --open open in browser
-v, --verbose 打印详细日志
这个版本的命令比较简单,只有一个-f
参数,如果没有填写,默认使用README.md
,常见用法
i5ting_toc -f sample.md -o
写文档很方便哦
刚发布,热乎乎的,欢迎尝试
2 回复
Api Usages
示例说明
var source_file = 'sample.md';
var markd_config = {
debug: false
}
require('i5ting_toc')(source_file, is_open, markd_config);
参数说明
- source_file 要编译的mardown文件
- is_open 是否在编译后使用浏览器中打开html
- markd_config 编译md的选项(具体见 https://github.com/chjj/marked )
gulp task for i5ting-toc
Usage
var gulp = require('gulp');
var i5ting_toc = require('./');
var opt = {
source_file: 'sample.md',
is_open: true,
markd_config: {
debug: false
}
}
gulp.task('default', function() {
gulp.src('sample.md')
.pipe(i5ting_toc(opt));
});