> 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/content-structure/page/tags.md).

# 标签

使用标签来分组相关内容、传达发布状态、标记过时内容，或任何有助于读者快速浏览文档的内容。

#### 为页面添加标签

1. 打开页面。
2. 将鼠标悬停在页面标题上并打开 **页面选项**.
3. 添加一个或多个标签。

拖动标签以更改它们在页面上的显示顺序。

#### 在页面上显示或隐藏标签

标签默认显示在页面顶部。要在保留相关元数据的同时隐藏页面标签：

1. 打开 **页面选项**.
2. 关闭 **在页面上显示标签**.

#### 在目录中显示标签

对于每个页面，你可以选择一个标签显示在目录中。要选择显示哪个标签：

1. 打开 **页面选项**.
2. 在 **标签**，从以下位置选择你的标签： **在目录中显示** 下拉菜单。

#### 为更新块添加标签

每个更新块都可以有自己的标签。

1. 打开更新块。
2. 点击 **添加标签** 在日期下方。
3. 使用标签选择器来添加、移除或重新排序标签。

#### 在资料库中管理标签

要查看、创建和管理你的分区标签：

1. 打开 **资源库** 从目录中。
2. 点击 **标签**.

每个标签都有：

* 标签名称——读者看到的内容
* 别名——稳定的标识符
* 可选的图标或表情符号

#### Markdown 中的标签

如果你使用 Git Sync，标签会出现在页面 frontmatter 中：

```yaml
---
description: "标签是可重复使用的标记，你可以将其添加到页面和更新块中——本页面将告诉你如何创建、添加和管理标签"
tags:
  - 新闻
  - 实验
  - tag: beta
    primary: true
  - pro
---
```

将字符串用于标准标签。使用 `primary: true` 在一个标签上将其设为页面的主标签——GitBook 可以在目录中显示该标签。


---

# 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/content-structure/page/tags.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.
