Use gitbook to take notes

Because I couldn't stand the sensitive porcelain of the blog in the wall, I decided to abandon the pit.

Install the git book environment

Reference https://l552177239.github.io/my-note/git/Linux/6-gitbook.html

gitbook - npm (npmjs.com)


Install node.js LTS

choco install nodejs-lts -y
 
# 安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org

npm install gitbook

proxychains npm install gitbook-cli -g
# 或 安装gitbook-cli
cnpm install gitbook-cli -g

Initialize eBook catalog

# 进入电子书目录
cd ebook目录名

# 初始化电子书目录
gitbook init
## 会创建两个文件
README.md  # 介绍文件
SUMMARY.md  # 目录文件

compile books

# 编译图书
gitbook build

# 预览图书
gitbook serve
## 会打开一个localhost页面.预览下电子书
localhost:4000

Export to e-book format

# 使用以下命令生成 PDF:
gitbook pdf ./myrepo ./mybook.pdf

# 使用以下命令生成 ePub:
gitbook epub ./myrepo ./mybook.epub

# 使用以下命令生成 MOBI:
gitbook mobi ./myrepo ./mybook.mobi

Guess you like

Origin blog.csdn.net/omaidb/article/details/123070430