fast-md
v1.0.4
Published
Convert markdown files to beautiful html files
Downloads
25
Maintainers
Readme
「为什么要使用 fast-md?」
「安装」
$ npm i fast-md -g
// 简单使用 < 确保当前目录下有叫 md 的文件夹 >
$ fmd turn
「简介」
Fast-md 可以把 markdown 变成漂亮的 html 文件
我在编写 markdown 的时候常常会感觉它不够美观,甚至除了 mark 高亮,没有任何上色的途径(除了使用 内联css)
谁也不会希望写作的时候花大量的时间在调整样式上面,于是有了fast-md
它可以将你的 md 文件批量处理成好看的 html 文件,就像这样 ↓
「丑陋的」
「美丽的」
「如何使用?」
「例子 1」
保证你的路径下面有 md 这样一个文件夹,这很重要。因为 fmd 默认会去 md 文件夹下读取所有 .md 文件,并输出在 当前的 dest 目录下
(你可以通过配置去更改==源文件路径==,或者==输出文件路径== )
$ cd test
$ fmd turn
* 感谢你使用 fast-md!🌈 🌈 🌈
* 正在处理md📄....
⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙ 100% | ETA: 0s | 110/100
* 处理成功,共计 11 个文件
「例子 2」
修改输出的路径和输入的路径
$ cd test
$ fmd turn --source markdwondir --dest outfiledir
dest => outfiledir 参数处理成功!
source => markdwondir 参数处理成功!
* 感谢你使用 fast-md!🌈 🌈 🌈
* 正在处理markdwondir📄....
⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙⎙ 100% | ETA: 0s | 110/100
* 处理成功,共计 11 个文件
「高级」
你可以通过修改 temp 下的模板文件实现自定义
修改完毕后记得修改 根目录下的 config.js 文件才会生效。如果你要自动生成 config.js 文件请确保文件名和样式名与我默认配置的一致
$ cd test
$ fmd generator temp/fasts/mod2
配置文件会输出到项目的根文件下的 tempC.json
「注意」
当前的自动生成配置文件还不是很好用,后续会考虑重新开发