1、搭建环境:(Node版)
安装docsify:
npm install docsify -g
启动
doc server:(文档目录为 docs)
docsify serve ./docs
访问文档服务:
htttp://localhost:3000
2、配置细节
配置左边导航:(slidebar)
配置搜索
<script> window.$docsify = { loadSidebar: true, search: { paths: 'zh-ch/', // noData: 'No results', placeholder: 'Search...', depth: 3 } } </script> <script src="./res/docsify.min.js"></script> <script src="./res/search.js"></script>
配置编辑连接
index.html配置细节