跳到主要内容

Front Matter

  • 标题
  • 侧边栏
  • 文档目录
  • 下一篇/下一篇
  • 编辑
  • 标签
  • 最后更新时间

模式

  • 文档模式
  • 博客模式
  • 页面模式

通用

参数类型默认值描述
titlestringMarkdown 标题博文的标题、文档使用的文本标题。 用于页面元数据和多个地方的备用值(侧边栏、下篇/上篇按钮……)。 如果 Markdown 内容没有标题,它会被自动添加到你的文档顶部。
descriptionstringMarkdown 正文的第一行The description of your document, which will become the <meta name="description" content="..."/> and <meta property="og:description" content="..."/> in <head>, used by search engines.
keywordsstring[]undefined用于搜索引擎优化的文档关键词元标签。
imagestringundefinedCover or thumbnail image that will be used as the <meta property="og:image" content="..."/> in the <head>, enhancing link previews on social media and messaging platforms.
draftbooleanfalseDraft(草稿)页面只在开发过程中可用。
unlistedbooleanfalse未列出的页面在开发过程中和生产端上都可用。
hide_table_of_contentsbooleanfalse是否隐藏右侧的文档目录。

docs & blog

参数类型默认值描述
toc_min_heading_levelnumber2目录中显示的最小标题层级。 必须介于 2 到 6 之间,并且小于等于最大值。
toc_max_heading_levelnumber3目录中显示的最大标题层级。 必须介于 2 和 6。
tagsTag[]undefinedA list of strings or objects of two string fields label and permalink to tag to your docs. Strings can be a reference to keys of a tags file (usually tags.yml)
last_updateFrontMatterLastUpdateundefined最后更新时间
slugstring文件路径Allows to customize the document URL (/<routeBasePath>/<slug>). Support multiple patterns: slug: my-doc, slug: /my/path/myDoc, slug: /.

Docs

参数类型默认值描述
idstring文件路径(包括文件夹,不含扩展名)文档的唯一 ID。
hide_titlebooleanfalse是否隐藏文档顶部显示的标题。
sidebar_labelstringtitle这篇文档在侧边栏中显示的文本
sidebar_positionnumber默认排序Controls the position of a doc inside the generated sidebar slice when using autogenerated sidebar items. See also Autogenerated sidebar metadata.
parse_number_prefixesbooleannumberPrefixParser plugin option是否禁用本文档的数字前缀解析。
sidebar_class_namestringundefined在使用自动生成侧边栏时,给相应的侧边栏标签一个特殊类名。
sidebar_custom_propsobjectundefinedAssign custom props to the sidebar item referencing this doc
displayed_sidebarstringundefined浏览当前文档时强制显示给定的侧边栏
pagination_labelstringsidebar_label or title这篇文档在上一篇/下一篇按钮中显示的文本
pagination_prevstring/null侧边栏的上一个文档「上篇文档」按钮链接到的文档 ID。为 null 时不显示该模块
pagination_nextstring/null侧边栏的下一个文档「下篇文档」按钮链接到的文档 ID。为 null 时不显示该模块
custom_edit_urlstring/nulleditUrl plugin option编辑此文档时要跳转到的 URL。为 null 时不显示该模块

Blog

参数类型默认值描述
datestring文件名或文件创建时间博文的创建时间
authorsAuthorsundefined博文作者列表(或者唯一作者)。

Pages

参数类型默认值描述
wrapperClassNamestring-为特定页面内容的包裹元素添加的类名。