天天看点

GitBook - 插件安装 - 悬浮目录

page-toc-button

在book.json中添加以下内容。然后执行gitbook install

{
    "plugins" : [ "page-toc-button" ]
}      

可选配置:

{
    "plugins" : [ 
        "page-toc-button" 
    ],
    "pluginsConfig": {
        "page-toc-button": {
            "maxTocDepth": 2,
            "minTocSize": 2
           }
    }
}      
名称 默认 描述
maxTocDepth 2 标题的最大深度(2 = h1 + h2 + h3)。不支持值> 2。
minTocSize 2 显示toc按钮的最小toc条目数。

安装插件

配置​

​book.json​

​如下:

{
    "plugins": [
        "-lunr", "-search", "search-pro",
        "back-to-top-button",
        "chapter-fold",
        "code",
        "splitter",
        "tbfed-pagefooter",
        "popup",
        "page-toc-button"
    ],
    "pluginsConfig": {
        "tbfed-pagefooter": {
            "copyright": "Copyright &copy Aron.Li 2019",
            "modify_label": "该文件修订时间:",
            "modify_format": "YYYY-MM-DD HH:mm:ss"
        },
        "page-toc-button": {
            "maxTocDepth": 2,
            "minTocSize": 2
        }
    }
}      

安装插件

$ gitbook install      

预览效果