> For AI agents: the complete documentation index is available at https://docs.halo.run/llms.txt, the full documentation bundle is available at https://docs.halo.run/llms-full.txt.

# 文章标签集合

用于列出所有文章标签的页面，可以用于实现标签墙等功能。

## 路由信息

- 模板路径：`/templates/tags.html`
- 访问路径：`/tags`

## 变量

### tags

#### 变量类型

List\<[#TagVo](#tagvo)>

#### 示例

```html title="/templates/tags.html"
<ul>
  <li th:each="tag : ${tags}">
    <a
      th:href="@{${tag.status.permalink}}"
      th:text="${tag.spec.displayName}"
    ></a>
  </li>
</ul>
```

### \_templateId

#### 变量值

`tags`

## 类型定义

### TagVo

```jsonc title="TagVo"
{
  "metadata": {
    "name": "string", // 唯一标识
    "labels": {
      "additionalProp1": "string",
    },
    "annotations": {
      "additionalProp1": "string",
    },
    "creationTimestamp": "2022-11-20T13:06:38.512Z", // 创建时间
  },
  "spec": {
    "displayName": "string", // 显示名称
    "slug": "string", // 别名，通常用于生成 status.permalink
    "color": "#F9fEB1", // 背景颜色
    "cover": "string", // 封面图
  },
  "status": {
    "permalink": "string", // 固定链接
  },
  "postCount": 0, // 文章数量
}
```
