跳转到主要内容
必填字段带有 必填 徽章。所有其他字段均为可选。 有关每组设置的功能说明,请参阅专题页面:

快速参考

属性类型必填默认值
themestring
namestring
colors.primarystring (hex)
navigationobject
descriptionstring
logostring 或 object
faviconstring 或 object
appearance.default"system" | "light" | "dark""system"
appearance.strictbooleanfalse
fonts.familystring主题默认
icons.library"fontawesome" | "lucide" | "tabler""fontawesome"
background.decoration"gradient" | "grid" | "windows"
styling.eyebrows"section" | "breadcrumbs""section"
styling.latexboolean自动检测
styling.codeblocks"system" | "dark" | string | object"system"
thumbnails.appearance"light" | "dark"站点默认
navbar.linksarray
navbar.primaryobject
footer.socialsobject
footer.linksarray
banner.contentstring
banner.dismissiblebooleanfalse
interaction.drilldownboolean主题默认
contextual.optionsarray
contextual.display"header" | "toc""header"
redirectsarray
variablesobject
metadata.timestampbooleanfalse
errors.404.redirectbooleantrue
api.openapistring 或 array 或 object
api.asyncapistring 或 array 或 object
api.playground.display"interactive" | "simple" | "none" | "auth""interactive"
api.playground.proxybooleantrue
api.params.expanded"all" | "closed""closed"
api.url"full"
api.examples.languagesarray of string
api.examples.defaults"required" | "all""all"
api.examples.prefillbooleanfalse
api.examples.autogeneratebooleantrue
api.spec.downloadbooleanfalse
seo.indexing"navigable" | "all""navigable"
seo.metatagsobject
search.promptstring
integrations.*object

完整属性参考

theme - 必填

站点的布局主题。 类型: string 选项: mintmaplepalmwillowlindenalmondaspensequoialuma 查看 主题 了解预览。

name - 必填

项目、组织或产品的名称。 类型: string

colors - 必填

文档中使用的颜色。 类型: object

colors.primary

必填 主色。通常在浅色模式下用于强调。 类型: string — 匹配 ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ 的十六进制代码

colors.light

深色模式下用于强调的颜色。 类型: string — 匹配 ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ 的十六进制代码

colors.dark

用于按钮和悬停状态的颜色。 类型: string — 匹配 ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ 的十六进制代码
内容的导航结构。 类型: object 查看 导航 获取完整文档。

description

用于 SEO 和 AI 索引的站点描述。 类型: string
站点 logo。提供路径字符串或分别为浅色和深色模式提供对象。 类型: string 或 object

logo.light

必填(使用对象形式时) 浅色模式的 logo 路径。示例:/logo/light.svg 类型: string

logo.dark

必填(使用对象形式时) 深色模式的 logo 路径。示例:/logo/dark.svg 类型: string

logo.href

点击 logo 时跳转的 URL。 类型: string (uri)

favicon

站点 favicon。自动调整大小。提供路径字符串或分别为浅色和深色模式提供对象。 类型: string 或 object

appearance

浅色/深色模式设置。 类型: object

appearance.default

默认颜色模式。 类型: "system" | "light" | "dark" 默认值: "system"

appearance.strict

设为 true 时,隐藏浅色/深色模式切换。 类型: boolean 默认值: false

fonts

自定义字体。支持 Google Fonts 和自托管字体。 类型: object

fonts.family

必填(使用 fonts 时) 字体系列名称。Google Fonts 字体系列名称会自动加载。 类型: string

fonts.weight

字重。可变字体支持小数值如 550 类型: number

fonts.source

托管字体的 URL 或本地字体文件的路径。Google Fonts 不需要此项。 类型: string (uri)

fonts.format

字体文件格式。使用 fonts.source 时必填。 类型: "woff" | "woff2"

icons

图标库设置。 类型: object

icons.library

必填 在整个文档中使用的图标库。 类型: "fontawesome" | "lucide" | "tabler" 默认值: "fontawesome"

background

背景图片、装饰和颜色设置。 类型: object

background.decoration

装饰背景图案。 类型: "gradient" | "grid" | "windows"

styling

视觉样式控制。 类型: object

styling.eyebrows

页面眉标样式。 类型: "section" | "breadcrumbs" 默认值: "section"

styling.latex

是否加载 LaTeX 样式表。 类型: boolean

styling.codeblocks

代码块主题配置。 类型: "system" | "dark" | string (Shiki 主题名称) | object 默认值: "system"
顶部导航栏配置。 类型: object 导航栏中显示的链接。 类型: array of object 导航栏中的主要行动号召按钮。 类型: object
页脚内容和社交链接。 类型: object 社交媒体资料。每个键是平台名称,每个值是你的资料 URL。 类型: object 有效键: xwebsitefacebookyoutubediscordslackgithublinkedininstagramhacker-newsmediumtelegramtwitterx-twitterearth-americasblueskythreadsredditpodcast 页脚中的链接列。 类型: array of object
显示在每个页面顶部的全站横幅。 类型: object 必填(使用 banner 时) 横幅文本。支持基本 MDX 格式,包括链接、粗体和斜体。不支持自定义组件。 类型: string 是否显示关闭按钮。 类型: boolean 默认值: false

interaction

导航交互设置。 类型: object

interaction.drilldown

控制用户点击导航组时的自动导航。 类型: boolean 默认值: 主题默认

contextual

页面操作和 AI 工具集成的上下文菜单。 类型: object

contextual.options

必填 上下文菜单中可用的操作。第一项是默认操作。 类型: array

contextual.display

上下文菜单的显示位置。 类型: "header" | "toc" 默认值: "header"

redirects

移动、重命名或删除的页面的重定向。 类型: array of object

variables

使用 {{variableName}} 语法在构建时替换的全局内容变量。 类型: object

metadata

全局页面元数据设置。 类型: object

metadata.timestamp

在所有页面上显示最后修改日期。 类型: boolean 默认值: false

errors

错误页面设置。 类型: object

errors.404

404 “页面未找到” 错误页面的设置。 类型: object

api

API 文档和演练场设置。 类型: object

api.openapi

OpenAPI 规范文件。 类型: string | array of string | object with source (string) and directory (string)

api.asyncapi

AsyncAPI 规范文件。 类型: string | array of string | object with source (string) and directory (string)

api.playground

交互式演练场设置。 类型: object

api.params

API 参数显示设置。 类型: object

api.url

基础 URL 显示模式。 类型: "full"

api.examples

代码示例设置。 类型: object

api.spec

OpenAPI 规范显示设置。 类型: object

api.mdx

从 MDX 文件构建的 API 页面的设置。 类型: object

seo

搜索引擎优化设置。 类型: object

seo.indexing

搜索引擎应索引哪些页面。 类型: "navigable" | "all" 默认值: "navigable"

seo.metatags

添加到每个页面的自定义 meta 标签。键值对。 类型: object
搜索栏设置。 类型: object

search.prompt

搜索栏中的占位符文本。 类型: string

integrations

第三方集成。 类型: object
属性类型必填字段描述
integrations.adobe.launchUrlstring (uri)Adobe Analytics launch URL。
integrations.amplitude.apiKeystringAmplitude API key。
integrations.clarity.projectIdstringMicrosoft Clarity 项目 ID。
integrations.clearbit.publicApiKeystringClearbit 公共 API key。
integrations.fathom.siteIdstringFathom 站点 ID。
integrations.frontchat.snippetIdstring (min 6)Front 聊天代码片段 ID。
integrations.ga4.measurementIdstring (以 G 开头)Google Analytics 4 衡量 ID。
integrations.gtm.tagIdstring (以 G 开头)Google Tag Manager 容器 ID。
integrations.heap.appIdstringHeap 应用 ID。
integrations.hightouch.writeKeystringHightouch write key。
integrations.hightouch.apiHoststringHightouch API 主机。
integrations.hotjar.hjidstringHotjar 站点 ID。
integrations.hotjar.hjsvstringHotjar 脚本版本。
integrations.intercom.appIdstring (min 6)Intercom 应用 ID。
integrations.logrocket.appIdstringLogRocket 应用 ID。
integrations.mixpanel.projectTokenstringMixpanel 项目 token。
integrations.pirsch.idstringPirsch 站点 ID。
integrations.plausible.domainstringPlausible 域名。
integrations.plausible.serverstringPlausible 服务器(仅自托管)。
integrations.posthog.apiKeystring (以 phc_ 开头)PostHog API key。
integrations.posthog.apiHoststring (uri)PostHog API 主机(仅自托管)。
integrations.posthog.sessionRecordingboolean启用会话录制。默认:false
integrations.segment.keystringSegment write key。
integrations.telemetry.enabledboolean启用 Mintlify 遥测。设为 false 时,反馈功能也会禁用。
integrations.cookies.keystringCookie 键名称。
integrations.cookies.valuestringCookie 值。