> ## Documentation Index
> Fetch the complete documentation index at: https://omer-914cc1c6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 横幅

> 添加横幅以显示全站重要公告和通知

使用横幅在整个文档站点显示重要公告、更新或通知。横幅会显示在每个页面顶部，支持 Markdown 格式，并且可以设置为可关闭。

要添加横幅，请在你的 `docs.json` 中使用 `banner` 属性：

<CodeGroup>
  ```json 产品公告换行 theme={null}
  "banner": {
    "content": "🚀 2.0 版本现已上线！查看我们的[更新日志](/changelog)了解详情。",
    "dismissible": true 
  }
  ```

  ```json 维护通知换行 theme={null}
  "banner": {
    "content": "⚠️ 计划维护：API 将于 12 月 15 日 UTC 时间凌晨 2:00–4:00 不可用",
    "dismissible": false
  }
  ```

  ```json 必要操作换行 theme={null}
  "banner": {
    "content": "**需要操作：**请在 1 月 1 日前迁移至我们的新版本。[迁移指南](/migration)",
    "dismissible": true
  }
  ```
</CodeGroup>

<div id="properties">
  ## 属性
</div>

<ResponseField name="content" type="string" required>
  横幅文案。支持纯文本和 Markdown 格式。
</ResponseField>

<ResponseField name="dismissible" type="boolean">
  是否允许用户关闭横幅。为 `true` 时，用户可将其关闭，且在当前会话内不会再次出现。默认值为 `false`。
</ResponseField>
