Quickly convert from gitbook to teedoc

Introduce how to quickly convert from gitbook to teedoc, because gitbook has stopped maintenance, and some features are no longer suitable for current use, such as single-threaded construction, which is very slow.

Take re0-web as an example:

The author said in the readme that it takes 30 minutes to build once, but after looking at the source code, the number of documents is not a lot, and it shouldn't take so long.After seeing that the author uses docker, and it is under windows, it is naturally very slow. The solution is to switch to the linux build, which will speed up some speed, and it is estimated that the build can be completed in 5 minutes.

Teedoc has the advantage of multi-threaded construction, and other functions and UI can also be satisfied, you can consider switching to teedoc (but teedoc does not support epub and pdf export (2021-05-29), if it is supported, it will be in here description)

Final effect: teedoc.github.io/re0-web-teedoc/

New teedoc project

mkdir re0-web-teedoc
cd re0-web-teedoc
teedoc init
teedoc install

Use the teedoc serve command to start the build and start an http service, visit http://127.0.0.1:2333 to preview

Use the teedoc build command to build a version that can be deployed to the server, the file is in the out directory, you can delete the out directory before building

Copy source file

The source files of the re0-web project are under the gitbook/markdown directory, the resource files (pictures) are all placed in gitbook/res, and the directory files on the left are in gitbook/SUMMARY.md

Other files are not important, they are all project files or generated files, so we only need to copy them

For example, create a folder books/re0, then