Personal Wiki build (Gitbook + GitHub Pages)

Tool selection: Gitbook + GitHub Pages

Probably process:

First written md files locally, and then generate html file corresponding to the last of these html files corresponding gitbook pushed to github repository.

Specific steps:

(A) Local installation and initialization gitbook

  1. Installation gitbook tools locally, a lot of detailed steps online, not repeat them here!

  2. Create a local directory, switch to that directory, execute gitbook initinitialization;
    then executed gitbook serveby accessing To preview the effect.

  3. Also within this directory, execute the command gitbook build, it will set the appropriate files into the appropriate md html file, it creates in the _bookdirectory.

(Ii) GitHub Pages configuration

  1. Create a file called gitbook warehouse in github, while creating the repository gh-pagesbranch (the gh-pages branch as the release of the source GitHub Pages).

  2. The local _bookcontent directory pushed gitbook warehouse gh-pagesbranch, and then we can https://userName.github.io/gitbook/ to visit our gitbook.

(C) Daily Edit! ! ! << ==

  1. Use Gitbook Editor to edit or Typora md document.
  2. Run gitbook buildbuild, then push gitbook warehouse gh-pagesbranch.
    (I am currently usually the first building to _book directory, then copied to the local clone repository directory, and then push in the warehouse directory )
Related pull / push command:

The gh-pages branch github item is cloned into a local directory is as follows:

git clone -b gh-pages https://github.com/zhongyuanzhao000/gitbook.git "D:Wiki\gh-pages"

Use git clone command to copy the project needs to be updated and when to push,

cd <project目录>        
git add *                     # 提交所有更改信息(删除 增加文件)
git commit -m "update"        # 提交更改文件的标签
git push origin gh-pages      # 推送到gh-pages分支

Guess you like

Origin www.cnblogs.com/zhongyuanzhao000/p/11610259.html