1. Plugins I
1.1. Expandable-chapters-small
折叠目录
{
"plugins": ["expandable-chapters-small"]
}
1.2. github-buttons
提供非官方的github按钮(star, fork, sponsor, and follow )
{
"plugins": [
"github-buttons"
],
"pluginsConfig": {
"github-buttons": {
"buttons": [{
"user": "azu",
"repo": "JavaScript-Plugin-Architecture",
"type": "star",
"size": "large"
}, {
"user": "azu",
"type": "follow",
"width": "230",
"count": false
}]
}
}
}
Option | Description | 备注 |
---|---|---|
user |
GitHub username that owns the repo/Username to sponsor | 必须,用户名 |
repo |
GitHub repository to pull the forks and watchers counts | 必须,仓库名 |
type |
Type of button to show: watch , fork , sponsor , or follow |
必须,4种类型之一 |
count |
Show the optional watchers or forks count: none by default or true |
可选,是否显示计数 |
size |
Optional flag for using a larger button: none by default or large |
可选,按钮大小 |
1.3. editlink
页面顶部编辑本页
{
"plugins": ["editlink"],
"pluginsConfig": {
"editlink": {
"base": "https://github.com/zhaoda/webpack-handbook/edit/master/content",
"label": "Edit This Page",
"multilingual": false
}
}
}
1.4. copy-code-button
复制代码按钮
{
"plugins": ["copy-code-button"]
}
1.5. page-footer-ex
定制页脚
{
"plugins": [
"page-footer-ex"
],
"pluginsConfig": {
"page-footer-ex": {
"copyright": "[mrcode](https://github.com/zq99299)",
"markdown": true,
"update_label": "<i>updated</i>",
"update_format": "YYYY-MM-DD HH:mm:ss"
}
}
}
1.6. anchor-navigation-ex
锚点导航-ex
{
"plugins": [
"anchor-navigation-ex"
]
}
1.7. Expandable-chapters-small
折叠目录
{
"plugins": ["expandable-chapters-small"]
}
1.8. prism
基于Prism的代码高亮
{
"plugins": ["prism", "-highlight"]
}
1.9. search-pro
中文搜索
{
"plugins": [
"-lunr", "-search", "search-pro"
]
}
1.10. donate
捐赠打赏
{
"plugins": ["donate"],
"pluginsConfig": {
"donate": {
"wechat": "例:/images/qr.png",
"alipay": "http://blog.willin.wang/static/images/qr.png",
"title": "默认空",
"button": "默认值:Donate",
"alipayText": "默认值:支付宝捐赠",
"wechatText": "默认值:微信捐赠"
}
}
}
1.11. splitter
左侧拖拽栏
{
"plugins": ["splitter"]
}
1.12. gitbook-plugin-advanced-emoji
支持显示markdown文件中的emoji
:artificial_satellite:
=> :artificial_satellite:
{
"plugins" : ["advanced-emoji"]
}
1.13. gitbook-plugin-katex-ng
支持显示latex公式
$\int_{-\infty}^\infty g(x) dx$
=> $\int_{-\infty}^\infty g(x) dx$
$$
\int_{-\infty}^\infty g(x) dx
$$
=>
$$ \int_{-\infty}^\infty g(x) dx
$$
{
"plugins": ["katex-ng"]
}
and so on