Skip to content

Commit

Permalink
Update FAQ-error
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanderZhao committed Apr 9, 2020
1 parent a443125 commit 8fd9f01
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gitbook-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

# example1
- name: Gitbook Action
uses: zanderzhao/gitbook-action@master #v1.2.2
uses: zanderzhao/gitbook-action@v1.2.2
with:
token: ${{ secrets.PERSONAL_TOKEN }}
time_zone: Asia/Shanghai
Expand Down
18 changes: 4 additions & 14 deletions gitbook-source/book.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
"author": "Zander Zhao",
"description": "Gitbook-Action",
"gitbook": "3.2.3",
"links": {
"sidebar": {
"# Marketplace": "https://github.com/marketplace/actions/gitbook-action",
"# Github": "https://github.com/ZanderZhao/gitbook-action"
}
},
"plugins": [
"-lunr",
"-search",
Expand All @@ -19,8 +13,7 @@
"mygitalk@git+https://github.com/plugins-zander/gitbook-plugin-mygitalk.git",
"edit-link@git+https://github.com/plugins-zander/gitbook-plugin-edit-link.git",
"sitemap-general@git+https://github.com/plugins-zander/gitbook-plugin-sitemap-general.git",
"tbfed-pagefooter@git+https://github.com/plugins-zander/gitbook-plugin-tbfed-pagefooter.git",
"todo@git+https://github.com/plugins-zander/gitbook-plugin-todo.git",
"gtag@git+https://github.com/plugins-zander/gitbook-plugin-gtag.git",
"chapter-fold@git+https://github.com/plugins-zander/gitbook-plugin-chapter-fold.git",
"copy-code-button@git+https://github.com/plugins-zander/gitbook-plugin-copy-code-button.git"
],
Expand All @@ -35,18 +28,15 @@
],
"distractionFreeMode": false
},
"gtag": {
"token": "UA-149127400-1"
},
"edit-link": {
"base": "https://github.com/ZanderZhao/gitbook-action/edit/master/gitbook-source",
"label": "EDIT"
},
"sitemap-general": {
"prefix": "https://zlogs.net/gitbook-action/"
},
"tbfed-pagefooter": {
"copyright": "Edit by Zander Zhao ; ",
"modify_bszlabel": "<span id=\"busuanzi_container_page_pv\">View Count: <span id=\"busuanzi_value_page_pv\"></span> </span>",
"modify_label": "Last Edit:",
"modify_format": "YYYY-MM-DD HH:mm:ss"
}
}
}
16 changes: 12 additions & 4 deletions gitbook-source/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@
3105

+ gitbook built fail,please check is there something wrong with your book.json or others
+ build fail with plugins
+ maybe something wrong with SUMMARY.md README.md
+ What happened
+ build fail with plugins
+ maybe something wrong with SUMMARY.md README.md or other file
+ TypeError: Path must be a string. Received undefined
+ Maybe use ` <img> ` in article, ` \<img\> ` or with backquote but not `<img>`
+ or wrong with book.json
+ or wrong other file
+ or some plugins can't install
+ Maybe there are extra commas.
+ Error: GitBook doesn't satisfy the requirements of this plugin: >=4.0.0-alpha.0
+ If not add `"gitbook": "XXX"`in`book.json`or add `gitbook_version: XXX`in`gitbook-action.yml`, default is `3.2.3`, maybe your plugins need different version, can find in package.json of plugin
+ or some plugins can't installs
+ maybe author remove it
+ or plugins run fail
+ Error: Cannot find module '/github/workspace/local_source/node_modules/XXX/package.json'
+ There something wrong with plugin, or or incompatible versions



Expand Down
24 changes: 12 additions & 12 deletions gitbook-source/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Add `.github/workflows/gitbook-action.yml`in your repo, with following content.

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304203049.png)
![](https://img1.zlogs.net/20/20200304203049.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304203445.png)
![](https://img1.zlogs.net/20/20200304203445.png)


```
Expand All @@ -26,9 +26,9 @@ jobs:
```


![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304204230.png)
![](https://img1.zlogs.net/20/20200304204230.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304204602.png)
![](https://img1.zlogs.net/20/20200304204602.png)



Expand All @@ -38,26 +38,26 @@ jobs:

- click https://github.com/settings/tokens

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304205657.png)
![](https://img1.zlogs.net/20/20200304205657.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304205817.png)
![](https://img1.zlogs.net/20/20200304205817.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304210004.png)
![](https://img1.zlogs.net/20/20200304210004.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304210104.png)
![](https://img1.zlogs.net/20/20200304210104.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304210306.png)
![](https://img1.zlogs.net/20/20200304210306.png)


#### step2.2 Add token to repo {#addtoken}

- go to https://github.com/ **yourname/yourrepo** /settings/secrets

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304210813.png)
![](https://img1.zlogs.net/20/20200304210813.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304210926.png)
![](https://img1.zlogs.net/20/20200304210926.png)

![](https://cdn.jsdelivr.net/gh/ZanderZhao/img20/file/20200304211301.png)
![](https://img1.zlogs.net/20/20200304211301.png)



Expand Down

0 comments on commit 8fd9f01

Please sign in to comment.