Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write product documentation and deploy gitbook to CVM

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

The editor of this article gives you a detailed description of "how to prepare product documents and deploy them to the CVM". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to prepare product documents and deploy gitbook to the CVM" will help you solve your doubts.

Introduction to GitBook

GitBook is a Node.js-based command-line tool that can be used to make exquisite e-books, and some Internet companies have even used GitBook to write their own product documents and operation documents. Powerful function, easy to use, said yes once used.

Many people wonder if GitBook is a related product of the Git family. In fact, the relationship between GitBook and Git is the same as that between Lei Feng and Leifeng Pagoda.

GitBook can use the Markdown editor to write books, and then you can also use Github/Git to maintain and manage book versions, collaborate with multiple people, and so on.

The e-book produced can support the output of a variety of document formats.

GitBook installation is deployed on the server

First of all, download Node.js according to the operating system of the server, and then I will mainly demonstrate the installation of Node.js according to the CentOs system.

Preparatory work:

CVM: CVM

Operating system: CentOs

1. Install Node.js in yum mode.

Curl-sL https://rpm.nodesource.com/setup_10.x | bash-yum install-y nodejs

Next, let's see if the installation is successful.

[root@localhost /] # node-vv12.16.0 [root@localhost /] # npm-v6.13.4

2. Install GitBook.

Global installation: after the execution of npm install gitbook-cli-g, gitbook- v can see the gitbook version, which means that the installation is successful.

GitBook has the following commands, the first six of which are commonly used:

Gitbook init / / initialization directory file gitbook help / / lists all commands of gitbook gitbook- help / / output help information for gitbook-cli gitbook build / / generate static web page gitbook serve / / generate static web page and run server gitbook build-gitbook=2.0.1 / / specify the version of gitbook when you generate Local will not download gitbook ls / / list all local gitbook versions gitbook ls-remote / / list remotely available gitbook version gitbook fetch tags / version numbers / / install the corresponding gitbook version gitbook update / / update to the latest version of gitbook gitbook uninstall 2.0.1 / / uninstall the corresponding gitbook version gitbook build-log=debug / / specify the level of log gitbook builid-debug / / output error message

Create an GitBook eBook

Go to the directory where you want to create the ebook and execute the gitbook init command.

After waiting for the execution to complete, the README.md file and SUMMARY.md file are generated in the directory, which can be written using the Markdown editor. SUMMARY.md file is mainly about chapter catalog information, while README.md file is mainly about books.

Publish an e-book

After writing the book, use the gitbook serve command mentioned above to generate the book into a static web page and run the server.

In addition, GitBook needs to open port 4000 to run on the server.

After configuring the network of the server, we can access the books we deployed on the server remotely.

Finally, you can see your books by visiting the http:// server IP address: 4000.

After reading this, the article "how to write product documents and deploy gitbook to the CVM" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it. If you want to learn more about related articles, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report