无需构建,写完 markdown 直接发布成文档,写说明文档的极佳选择。css
npm i docsify-cli -g
docsify init docshtml
新建一个空项目,接着建立一个 docs 目录并进入到 docs 目录下vue
mkdir my-project && cd my-project
mkdir docs && cd docsgit
根目录下建立index.html 文件github
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>li.css</title> <meta name="description" content="Description"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css"> </head> <body> <div id="app"></div> </body> <script src="//unpkg.com/docsify/lib/docsify.js" data-router data-repo="https://helijun.github.io/pages/docs/index.html"></script> </html>
docsify serve docsnpm
docsify自动监听3000端口,浏览器输入 http://localhost:3000
就能够看到你在README.md里面编辑的内容了浏览器
将文档托管到github,这样就能够随时随地访问了。
新建一个仓库,在setting里面开启 GitHub Pages 功能,如图:markdown
浏览器输入https://helijun.github.io/pages/. 就能够看到你的文档了,固然若是你这个仓库包含了其余的文档的话 select source那里选择master branch,这样就不会影响其余文档的浏览,好比个人最终连接是 https://helijun.github.io/pages/docs/index.html#/,暂时存放LIUI的草稿文档app
官方文档:https://docsify.js.org/zh-cnscala