Simple plugin to add « Click to Reveal » functionnality to your GitBook.
In your book.json add the plugin:
{
"plugins": [
"click-reveal"
]
}
Quick use :
{% reveal %}
Your element to **hide**
{% endreveal %}
With custom text :
{% reveal text="Click here to reveal my secret" %}
Your element to **hide**
{% endreveal %}
配置book.json
如下:
{
"plugins": [
"-lunr", "-search", "search-pro",
"back-to-top-button",
"chapter-fold",
"code",
"splitter",
"tbfed-pagefooter",
"popup",
"page-toc-button",
"accordion",
"click-reveal"
],
"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
安装。
{% reveal text="Click here to reveal my secret" %}
Your element to **hide**
{% endreveal %}
这个显示之后就没法隐藏,有点缺陷。