> 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/creating-content/blocks/expandable.md).

# 可展开

可展开块有助于将原本可能很长的一段文字压缩得更简洁。它们也非常适合分步指南和常见问题解答。

默认情况下，可展开块在你发布的文档站点上会处于折叠状态。如果你希望某个可展开块默认展开，请打开该块的 **选项菜单** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="/files/e1df373962dc4830bcb786d7e5cb3cce603367d3" alt=""></picture> 并选择 **默认展开**.

### 示例

<details open>

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

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

你也可以将展开的块设置为 **默认展开** 在块的 **选项菜单** <picture><source srcset="/files/QLUQj6waZRiK6FpSqrt6" media="(prefers-color-scheme: dark)"><img src="/files/e1df373962dc4830bcb786d7e5cb3cce603367d3" 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 dynamically by asking a question.

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

```
GET https://gitbook.com/docs/documentation/zh/creating-content/blocks/expandable.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
