项目主页 Frontmatter 配置
大约 2 分钟
选项
home必填
boolean是否使用项目首页布局。
title
string页面标题,会用于路径导航、SEO 等。
heroText
string默认值 站点标题
主页标题。设置为空字符串可隐藏默认标题。
tagline
string默认值
"Welcome to your VuePress site"主页的简短描述。
heroImage
string主页图标 (logo) 链接,不支持相对路径。
heroImageDark
string默认值
heroImage深色模式下主页图标 (logo) 链接,不支持相对路径。
heroAlt
string默认值
heroText主页图标的替代文字。
heroImageStyle
Record<string, string> | string首页图标的 CSS 样式。
bgImage
string背景图片的地址,不支持相对路径。
bgImageDark
string默认值
bgImage深色模式下背景图片的地址,不支持相对路径。
bgImageStyle
Record<string, string> | string背景图片的 CSS 样式。
heroStyle
stringHero 样式。
heroFullScreen
boolean是否全屏显示 Hero。
actions
ThemeProjectHomeActionOptions[]主页操作。
actions[*].text必填
string操作名称。
actions[*].link必填
string操作链接。
actions[*].type
'primary' | 'default'默认值
'default'操作类型。
actions[*].icon
string操作图标。
highlights
(ThemeProjectHomeFeatureOptions | ThemeProjectHomeHighlightOptions)[]主页的亮点区域。每一项要么是功能区域,要么是亮点区域。
highlights[*].header
string区域标题,支持 HTML 字符串。亮点区域中为必填。
highlights[*].description
string区域描述,支持 HTML 字符串。
highlights[*].color
string文字颜色。
highlights[*].image
string区域图像。
highlights[*].imageDark
string默认值
image夜间模式使用的区域图片。
highlights[*].bgImage
string区域背景图。
highlights[*].bgImageDark
string默认值
bgImage夜间模式使用的区域背景图。
highlights[*].bgImageStyle
Record<string, string> | string区域背景图样式。
highlights[*].featuresfeature-section: Yes
ThemeProjectHomeFeatureItem[]功能区域中的功能。
highlights[*].features[*].title必填
string项目名称,支持 HTML 字符串。
highlights[*].features[*].details
string项目描述,支持 HTML 字符串。
highlights[*].features[*].icon
string项目图标,支持图片链接或图标字体类。
highlights[*].features[*].link
string项目链接。
highlights[*].typehighlight-section: Yes
'order' | 'un-order' | 'no-order'默认值
'un-order'亮点区域的列表类型。
highlights[*].highlightshighlight-section: Yes
ThemeProjectHomeHighlightItem[]亮点区域中的亮点。
highlights[*].highlights[*].title必填
string项目名称,支持 HTML 字符串。
highlights[*].highlights[*].details
string项目描述,支持 HTML 字符串。
highlights[*].highlights[*].icon
string项目图标,支持图片链接或图标字体类。
highlights[*].highlights[*].link
string项目链接。
features
ThemeProjectHomeFeatureItem[]主页的功能。
features[*].title必填
string功能名称,支持 HTML 字符串。
features[*].details
string功能描述,支持 HTML 字符串。
features[*].icon
string功能图标,支持图片链接或图标字体类。
features[*].link
string功能链接。
更新日志
2026/9/28 12:45
查看所有更新日志
0c1aa-于98fc7-于329ae-于014e1-于48142-于42e92-于31bea-于2c923-于d7e50-于86180-于8174c-于1ece7-于5a6f8-于9c981-于