> 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/snippets.md).

# 片段

{% hint style="warning" %}
Snippets 功能已不再在 GitBook 中维护，且可能会发生变化。我们建议将你的内容结构化为一个 [空间](/docs/documentation/zh/creating-content/content-structure/space.md) 。
{% endhint %}

Snippet 块是引用内容中某个 snippet 的绝佳方式。与 [行内链接](/docs/documentation/zh/creating-content/formatting/inline.md#relative-links).

相比，Snippet 块有助于让你的 snippet 链接在页面上更加醒目。

{% hint style="warning" %}
**注意：** 如果你使用 snippet 块，但随后 [将你的 snippet 转换为页面](/docs/documentation/zh/pian-duan/snippets-beta.md#convert-a-snippet-to-a-page) 在你的文档中，你的 snippet 块仍会链接回原始 snippet，而该 snippet 将被归档。
{% endhint %}

### Markdown 中的表示

```
{% content-ref url="./" %} . {% endcontent-ref %}
```


---

# 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/snippets.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.
