1、找到以下目录中的host文件

C:\Windows\System32\drivers\etc

2、使用管理员权限将host文件剪切到其他目录
3、在host文件中增加任意域名映射

127.0.0.1 www.test.com

4、将修改后的host文件剪切到原来目录
5、在flask中增加以下代码

app.config['SERVER_NAME'] = 'www.test.com:5000'

在typecho源码中找到如下文件

/var/HyperDown.php

在文件中找到386行附近的如下代码

<a href=\"{$url}\">{$escaped}</a>

修改为

<a target=\"_blank\" href=\"{$url}\">{$escaped}</a>

在文件中找到398行附近的如下代码

<a href=\"{$self->_definitions[$matches[2]]}\">{$escaped}</a>

修改为

<a target=\"_blank\" href=\"{$self->_definitions[$matches[2]]}\">{$escaped}</a>

一、更改此次安装模块的源

pip install 模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple

二、永久更改安装源需
1、在当前用户目录下创建pip文件夹
2、在pip文件夹中创建pip.ini文件
3、在pip.ini文件中输入以下代码

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

三、推荐几个国内安装源

# 清华大学
https://pypi.tuna.tsinghua.edu.cn/simple/
# 阿里云
http://mirrors.aliyun.com/pypi/simple/
# 豆瓣
http://pypi.douban.com/simple/

下载并安装完成node.js12.16.3.msi后打开命令提示符

node --version # 显示版本号表示安装成功
npm --version # 显示版本号表示安装成功

修改及查看npm镜像源

npm config set registry https://registry.npmmirror.com # 修改
npm config get registry # 查看

使用以下命令安装gitbook-cli

npm install gitbook-cli -g

如果安装出错需要清空缓存后重新安装

npm cache clean --force # 清空缓存

进入电子书目录使用以下命令生成html

gitbook build # 首次使用需要等待gitbook安装完成

生成html后可以在服务器上正常浏览
本地浏览html需要查找theme.js中的代码

if(m)for(n.handler&&

修改为

if(false)for(n.handler&&