GitHub and GitBook collaborate on a free, timely release of GitBook

  • 1. You need an account
  • 2. Create a GitHub project
    • Structure of GitBook
    • Other content
  • 3. GitBook
    • registered
    • Integration making
    • Remove the default display
    • Local update, after modification can also push
  • 4. Effect display
    • Preliminary effect display
    • Design your own GitBook

1. You need an account

Sign up for or use an existing GitHub and GitBook account

2. Create a GitHub project

Github.com/shenhonglei…

Structure of GitBook

.gitbook.yaml

# Root directory to locate the content
# Default is the root directory of the repository.
root: ./docs

# Files to use as SUMMARY/README.
# (Relative to <root> directory)
structure:
  readme:  README.md
  summary: SUMMARY.md

# Redirect urls to specific files (relative to the <root> directory)
#redirects:
  #previous/page: new-folder/page.md
Copy the code

Other content

You can start by creating an empty project and then add.gitbook.yamlTo adddocsDirectory, and then write their own content inside, specific can refer to my demo project.



When integrating with GitBook later, updated content can be pushed to each other.

3. GitBook

registered

A little…

Integration making

I’m going to usemainbranch



Remove the default display



This step is very important



Make it not the default first, and then delete what is not needed.



Synced to GitHub



Local update, after modification can also push

4. Effect display

Preliminary effect display



You can view the preliminary results of the share link after share

Design your own GitBook

You can design your own logo title, theme, font, Header, default language, and more.

Charge content is their own domain name.