> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/expandable.md).

# 可展开

向页面添加可展开块，以缩短页面、隐藏较长内容，或创建 FAQ

可展开块有助于将原本可能很长的段落压缩精简。它们在分步指南和常见问题中也非常有用。

默认情况下，可展开块在已发布的文档站点中会处于折叠状态。如果希望可展开块默认展开，请打开该块的 **选项菜单** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt=""></picture> 并选择 **默认展开**.

### 示例

<details open>

<summary>步骤 1：开始使用可展开块</summary>

要添加可展开块，请在空块中按 `/` ，或点击编辑器左侧的 `+` ，然后选择 **可展开**.

你也可以将可展开块设置为 **默认展开** （位于块的 **选项菜单** <picture><source srcset="broken://files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-23f3e8f05326b0d239d32d28bba99c1d46f204f7%2F25_01_10_options_light.svg?alt=media" alt=""></picture> 中）——就像这个块一样。

</details>

<details>

<summary>步骤 2：向你的块中添加内容</summary>

插入可展开块后，你可以向其中添加内容——包括列表和代码块。

</details>

## Markdown 表示

{% code overflow="wrap" %}

```markdown
# 可展开块

<details open>

<summary>在此添加可展开标题</summary>

在此添加可展开正文。此可展开块默认处于展开状态。

</details>

<details>

<summary>在此添加可展开标题</summary>

在此添加可展开正文。此可展开块默认处于折叠状态。

</details>
```

{% endcode %}

### 限制

在可展开块内部可创建的块类型有一些限制。你可以在可展开块中插入以下类型的内容：

* 段落
* 标题（1、2 和 3）
* 无序列表、有序列表和任务列表
* 行内图片

要随时查看完整列表，请在可展开块中新起一行并按 `/` 以打开插入选项面板。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/expandable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
