첫 업로드
gitbook build
cd _book
git init
git remote add origin [레포주소]
git checkout -b gh-pages
git add -A
git commit -m "first gitbook"
git push -u origin gh-pages
게시글 수정한 후 업로드
gitbook build
나 gitbook serve
시 기존 _book
은 초기화되므로
아래와 같이 다시 git에 재연결후 pull
한다음 강제 push
아래 구문을 shell script로 만들어서 한번에 동작하게 함.
gitbook install && gitbook build
cd _book
git init
git remote add origin https://github.com/hiwony7933/document.git
git pull origin gh-pages --allow-unrelated-histories
git checkout -b gh-pages
git add -A
git commit -m "update"
git push -u origin +gh-pages
gitbook plugin 추가
ga : analytics.google https://analytics.google.com/
sitemap
folding-chapters
back-to-top-button
copy-code-button
anchor-navigation-ex https://github.com/swapagarwal/awesome-gitbook-plugins
{
"plugins": [
"ga",
"sitemap",
"folding-chapters",
"back-to-top-button",
"copy-code-button",
"intopic-toc"
],
"pluginsConfig": {
"ga": {
"token": "UA-158722802-1"
},
"sitemap": {
"hostname": "https://hiwony7933.github.io/document"
}
}
}