之前用gitbook

但是后来node.js版本太高之后无法再使用

现在改为https://docsify.js.org/

安装

可以使用npm安装

npm i docsify-cli -g

安装完成后

切换到markdown项目文件夹,例如D:\gitbook\test,然后运行cmd

初始化

执行命令:

docsify init

本地运行网站:

docsify serve

目录

根目录下创建文件

目录文件:_sidebar.md

用来测试目录:init.md

然后修改_sidebar.md内容

* [首页](/)
* [初始化](/init)

修改根目录下的index.html,更改js部分的配置

window.$docsify = {
      name: '',
      repo: '',
      relativePath: true,
      subMaxLevel: 2,
      loadSidebar: true
    }

nginx部署网站

server{
        listen  8011;
        server_name  localhost;
		location / {
			root D:/gitbook/test;
			index index.html index.htm;
		}
	}

更多推荐