i5ting/tocmd.npm 将MD转换为HTML简单使用

模块链接

i5ting_toc

i5ting_toc a node npm wrapper of i5ting_ztree_toc https://github.com/i5ting/i5ting_ztree_toc

  • ruby版本tocmd
  • node版本i5ting_toc

Preview

i5ting/tocmd.npm 将MD转换为HTML简单使用_第1张图片

全局安装

npm install -g i5ting_toc

使用方法

全局安装完毕之后,直接在此处打开命令行,切换到你想要转换的md文件根目录下,使用以下命令,这个版本的命令比较简单,只有一个-f参数,如果没有填写,默认使用README.md

i5ting_toc -f sample.md -o

常见的命令参数如下:

-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 打印详细日志

运行成功之后则在当前目录下生成一个preview文件夹,里面就是我们想要的东东了
i5ting/tocmd.npm 将MD转换为HTML简单使用_第2张图片

你可能感兴趣的:(Nodejs)