> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ticoag.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# 全局设置

> 通过 docs.json，Mintlify 让你完全掌控文档站点的外观与体验

每个 Mintlify 站点都需要一个 `docs.json` 文件来承载核心配置。下面介绍常用 [属性（properties）](#properties)。

## 属性（Properties）

<ResponseField name="name" type="string" required>
  项目名称，用于全局标题（global title）。

  示例：`mintlify`
</ResponseField>

<ResponseField name="navigation" type="Navigation[]" required>
  分组数组，每个分组包含该组内的页面

  <Expandable title="Navigation">
    <ResponseField name="group" type="string">
      分组名称。

      示例：`Settings`
    </ResponseField>

    <ResponseField name="pages" type="string[]">
      作为页面渲染的 Markdown 文件相对路径。

      示例：`["customization", "page"]`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="logo" type="string or object">
  Logo 图片路径，或包含「light / dark」两套 logo 路径的对象

  <Expandable title="Logo">
    <ResponseField name="light" type="string">
      浅色模式下的 logo 路径
    </ResponseField>

    <ResponseField name="dark" type="string">
      深色模式下的 logo 路径
    </ResponseField>

    <ResponseField name="href" type="string" default="/">
      点击 logo 后跳转到的链接
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="favicon" type="string">
  favicon 图片路径
</ResponseField>

<ResponseField name="colors" type="Colors">
  全局主题配色（Hex color）

  <Expandable title="Colors">
    <ResponseField name="primary" type="string" required>
      主色（primary）。浅色模式下主要用于高亮内容、分节标题、强调色等。
    </ResponseField>

    <ResponseField name="light" type="string">
      深色模式下的主色（primary）。主要用于高亮内容、分节标题、强调色等。
    </ResponseField>

    <ResponseField name="dark" type="string">
      重要按钮的主色
    </ResponseField>

    <ResponseField name="background" type="object">
      浅色/深色模式的背景色

      <Expandable title="Object">
        <ResponseField name="light" type="string" required>
          浅色模式背景色（Hex）
        </ResponseField>

        <ResponseField name="dark" type="string" required>
          深色模式背景色（Hex）
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="topbarLinks" type="TopbarLink[]">
  顶部栏（topbar）链接数组，由 `name` 与 `url` 组成

  <Expandable title="TopbarLink">
    <ResponseField name="name" type="string">
      按钮名称。

      示例：`Contact us`
    </ResponseField>

    <ResponseField name="url" type="string">
      点击按钮后的跳转 URL。示例：`https://mintlify.com/docs`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="topbarCtaButton" type="Call to Action">
  <Expandable title="Topbar Call to Action">
    <ResponseField name="type" type={'"link" or "github"'} default="link">
      `link`：显示一个按钮；`github`：根据提供的仓库 URL 展示 GitHub 信息（含 star 数）。
    </ResponseField>

    <ResponseField name="url" type="string">
      若为 `link`：按钮跳转到的 URL。

      若为 `github`：用于加载 GitHub 信息的仓库链接。
    </ResponseField>

    <ResponseField name="name" type="string">
      按钮文字。仅当 `type` 为 `link` 时必填。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="versions" type="string[]">
  版本名称数组。仅当你希望在导航栏中用下拉框展示多版本文档时使用。
</ResponseField>

<ResponseField name="anchors" type="Anchor[]">
  anchors 数组，包含 `icon`、`color`、`url` 等配置。

  <Expandable title="Anchor">
    <ResponseField name="icon" type="string">
      用于展示该 anchor 的 [Font Awesome](https://fontawesome.com/search?q=heart) icon。

      示例：`comments`
    </ResponseField>

    <ResponseField name="name" type="string">
      anchor 的显示名称（label）。

      示例：`Community`
    </ResponseField>

    <ResponseField name="url" type="string">
      URL 前缀，用于标识哪些页面归入该 anchor。一般对应你放置页面的文件夹名称。
    </ResponseField>

    <ResponseField name="color" type="string">
      anchor icon 背景色（Hex）。也可传入包含 `from` 和 `to`（均为 Hex）的对象来实现渐变。
    </ResponseField>

    <ResponseField name="version" type="string">
      若你希望在选择特定文档版本前隐藏该 anchor，可使用此字段。
    </ResponseField>

    <ResponseField name="isDefaultHidden" type="boolean" default="false">
      传 `true` 则默认隐藏该 anchor，直到你使用直链把用户带到该 anchor 下的页面。
    </ResponseField>

    <ResponseField name="iconType" default="duotone" type="string">
      可选值之一："brands"、"duotone"、"light"、"sharp-solid"、"solid"、"thin"
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="topAnchor" type="Object">
  覆盖最顶部 anchor 的默认配置。

  <Expandable title="Object">
    <ResponseField name="name" default="Documentation" type="string">
      最顶部 anchor 的名称
    </ResponseField>

    <ResponseField name="icon" default="book-open" type="string">
      Font Awesome icon。
    </ResponseField>

    <ResponseField name="iconType" default="duotone" type="string">
      可选值之一："brands"、"duotone"、"light"、"sharp-solid"、"solid"、"thin"
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="tabs" type="Tabs[]">
  导航 tabs 数组。

  <Expandable title="Tabs">
    <ResponseField name="name" type="string">
      tab 的显示名称（label）。
    </ResponseField>

    <ResponseField name="url" type="string">
      URL 前缀，用于标识哪些页面归入该 tab。一般对应你放置页面的文件夹名称。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="api" type="API">
  API 相关配置。更多信息可参考 [Mintlify API Playground 概览](https://www.mintlify.com/docs/api-playground/overview)。

  <Expandable title="API">
    <ResponseField name="baseUrl" type="string">
      所有 API endpoints 的 base URL。若 `baseUrl` 为数组，则会启用多个可切换的 base URL 选项。
    </ResponseField>

    <ResponseField name="auth" type="Auth">
      <Expandable title="Auth">
        <ResponseField name="method" type="&#x22;bearer&#x22; | &#x22;basic&#x22; | &#x22;key&#x22;">
          所有 API endpoints 使用的鉴权策略。
        </ResponseField>

        <ResponseField name="name" type="string">
          API playground 中使用的鉴权参数名称。

          若 method 为 `basic`，格式应为 `[usernameName]:[passwordName]`
        </ResponseField>

        <ResponseField name="inputPrefix" type="string">
          设计为鉴权输入框前缀的默认值。

          例如：若 `inputPrefix` 为 `AuthKey`，则鉴权输入框会默认以 `AuthKey` 作为前缀。
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="playground" type="Playground">
      API playground 配置

      <Expandable title="Playground">
        <ResponseField name="mode" default="show" type="&#x22;show&#x22; | &#x22;simple&#x22; | &#x22;hide&#x22;">
          playground 的展示模式：显示（show）、隐藏（hide）、或仅展示 endpoint 但不提供交互的简化模式（simple）。

          更多说明见：[Mintlify API Playground 概览](https://www.mintlify.com/docs/api-playground/overview)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="maintainOrder" type="boolean">
      启用该开关后，OpenAPI 页面中的 key 顺序会与 OpenAPI 文件中定义的顺序一致。

      <Warning>This behavior will soon be enabled by default, at which point this field will be deprecated.</Warning>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="openapi" type="string | string[]">
  指向 OpenAPI 文件的 URL（字符串）或 URL 数组（字符串数组），也可以使用相对路径。

  示例：

  <CodeGroup>
    ```json Absolute theme={null}
    "openapi": "https://example.com/openapi.json"
    ```

    ```json Relative theme={null}
    "openapi": "/openapi.json"
    ```

    ```json Multiple theme={null}
    "openapi": ["https://example.com/openapi1.json", "/openapi2.json", "/openapi3.json"]
    ```
  </CodeGroup>
</ResponseField>

<ResponseField name="footerSocials" type="FooterSocials">
  社交媒体账号对象，其中 key 表示平台、value 表示账号 URL。

  示例：

  ```json theme={null}
  {
    "x": "https://x.com/mintlify",
    "website": "https://mintlify.com"
  }
  ```

  <Expandable title="FooterSocials">
    <ResponseField name="[key]" type="string">
      可选值之一：`website`、`facebook`、`x`、`discord`、`slack`、`github`、`linkedin`、`instagram`、`hacker-news`

      示例：`x`
    </ResponseField>

    <ResponseField name="property" type="string">
      对应平台的 URL。

      示例：`https://x.com/mintlify`
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="feedback" type="Feedback">
  反馈（feedback）按钮相关配置

  <Expandable title="Feedback">
    <ResponseField name="suggestEdit" type="boolean" default="false">
      启用按钮，允许用户通过 Pull Request 提交修改建议
    </ResponseField>

    <ResponseField name="raiseIssue" type="boolean" default="false">
      启用按钮，允许用户针对文档提出 Issue
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="modeToggle" type="ModeToggle">
  自定义深色模式切换（dark mode toggle）。

  <Expandable title="ModeToggle">
    <ResponseField name="default" type={'"light" or "dark"'}>
      为新用户设置默认展示 light 或 dark 模式。未设置时，默认跟随用户操作系统。
    </ResponseField>

    <ResponseField name="isHidden" type="boolean" default="false">
      设为 `true` 可隐藏 light/dark 模式切换。你也可以将 `isHidden` 与 `default` 组合使用，强制文档只使用 light 或 dark 模式。例如：

      <CodeGroup>
        ```json Only Dark Mode theme={null}
        "modeToggle": {
          "default": "dark",
          "isHidden": true
        }
        ```

        ```json Only Light Mode theme={null}
        "modeToggle": {
          "default": "light",
          "isHidden": true
        }
        ```
      </CodeGroup>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="backgroundImage" type="string">
  显示在每个页面背后的背景图。可参考示例：[Infisical](https://infisical.com/docs) 以及 [FRPC](https://frpc.io)。
</ResponseField>
