In GitBook editor (or any else):
%accordion%Some title here%accordion%
Any content here
%/accordion%that`s all! But each tag should be in one paragraph
similarly you can include accordion in accordion (like content)
IE11+ (flexboxes)
573 B minified, 282 B minified + gzipped
Update book.json, like:
{
"gitbook": "3.2.2",
"title": "Cool book",
"plugins": ["accordion"]
}Then run
gitbook install That`s all, see Usage
首先设置book.json如下:

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

示例模板:
%accordion%Some title here%accordion%
Any content here
%/accordion%写入md文件中如下:

启动gitbook serve预览如下:

可以折叠缩放内容了。