Skip to content

Latest commit

 

History

History
106 lines (60 loc) · 2.58 KB

20220808_07.md

File metadata and controls

106 lines (60 loc) · 2.58 KB

MACOS 安装gitbook

作者

digoal

日期

2022-08-08

标签

PostgreSQL , gitbook


背景

可能gitbook从本地转战SaaS, 本地已经多年未维护, 坑非常多, 特别是版本的坑.

https://blog.csdn.net/qq_43528771/article/details/107949010

如果npm版本不对, 请先清理npm

sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}  

安装10.22.0版本的npm

https://nodejs.org/dist/v10.22.0/

https://nodejs.org/dist/v10.22.0/node-v10.22.0.pkg

配置taobao nodejs源.

vi ~/.npmrc  
  
registry = https://registry.npm.taobao.org  
strict-ssl=false  

安装gitbook打包工具

sudo npm install -g gitbook-cli  

安装gitbook

gitbook -V  

配置一本gitbook电子书目录

mkdir ~/polardb_doc/polardb-x  

初始化gitbook电子书目录

cd ~/polardb_doc/polardb-x  
gitbook init  
  
  
info: create README.md   
info: create SUMMARY.md   
info: initialization is finished   

启动预览服务

gitbook serve  
  
Starting server ...  
Serving book on http://localhost:4000  

预览

http://localhost:4000

digoal's wechat