# GitBook单章节展开插件

在使用GitBook的时候，默认GitBook会将所有章节的索引都展开，对于多章节的书籍展示非常不美观。这点不如[Sphinx Doc](http://www.sphinx-doc.org)书籍默认只展示查看的章节。

[gitbook-plugin-toggle-chapters](https://www.npmjs.com/package/gitbook-plugin-toggle-chapters)提供了只展示阅读章节的功能：

```bash
npm install gitbook-plugin-codeblock-filename -g
cd cloud-atlas
gitbook install
```

然后修改`book.json`添加

```javascript
{
    "plugins": ["toggle-chapters"]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://huataihuang.gitbook.io/cloud-atlas-draft/develop/doc/gitbook/gitbook_toggle_chapters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
