> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-mintlify-add-hello-world-quickstart-48843.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 横幅

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

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

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

<CodeGroup>
  ```json Product announcements wrap
  "banner": {
    "content": "🚀 2.0 版本现已上线！查看我们的[变更日志](/changelog)了解详情。",
    "dismissible": true 
  }
  ```

  ```json Maintenance notices wrap
  "banner": {
    "content": "⚠️ 计划维护：12 月 15 日 02:00–04:00（UTC）期间 API 将不可用",
    "dismissible": false
  }
  ```

  ```json Required actions wrap
  "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>
