GitBook的本機環境與應用的產出

線上文件是一種顛覆本機工作的產物,哈!今天來玩玩GitBook的文件產出XD
這篇不是新手文章,是新手的請確認你己會使用gitbook
直接進主題:

確定己經安裝了gitbook-cli還沒裝的快去裝XD, 這個套件可以讓我們的gitbook文件產出
HTML 文件
ePub 電子書
Kindle 電子書
製作 PDF 電子書

今天的例子是HTML文件
先切換像到你的gitbook目錄位置, 執行終端指令
開啟.gitignore檔查看

# Node rules:
## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

## Dependency directory
## Commenting this out is preferred by some people, see
## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git
node_modules

# Book build output
_book

# eBook build output
*.epub
*.mobi
*.pdf

如果沒有上面這段就自己打吧XD

若在本地看gitbook命令列輸入:
gitbook serve
它預設會開啟 localhost:4000


若要產生html靜態檔案, 命令列輸入:
gitbook fulid --output=/site/mybook


然後...

登登 success
來去目錄查看一下吧

有了之後, 直接去打開index.html吧GO~~

YA~有嘍~大功告成, 美觀又漂亮XD

收工! (握拳


沒有留言: