import{$ as e,B as t,P as n,_ as r,f as i,g as a,h as o,l as s}from"./runtime-core.esm-bundler-CZvn3YaB.js";import{t as c}from"./plugin-vue_export-helper-CxTVcLa7.js";var l=JSON.parse(`{"path":"/config/frontmatter/basic/","title":"通用配置 | 配置","lang":"zh-CN","frontmatter":{"title":"通用配置","createTime":"2024/03/02 20:01:09","permalink":"/config/frontmatter/basic/","description":"概述 通用 Frontmatter 配置,适用于 所有的文章。 示例: 配置 pageLayout 类型: false | 'home' | 'doc' | 'custom' | 'page' | 'friends' | string 默认值: doc 详情: 页面布局方式。 'home': 主页布局 'doc': 文章页布局,包括左侧侧边栏、文章内容...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"通用配置\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-11-25T17:13:24.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://theme-plume.vuejs.press/config/frontmatter/basic/"}],["meta",{"property":"og:site_name","content":"Plume 主题"}],["meta",{"property":"og:title","content":"通用配置"}],["meta",{"property":"og:description","content":"概述 通用 Frontmatter 配置,适用于 所有的文章。 示例: 配置 pageLayout 类型: false | 'home' | 'doc' | 'custom' | 'page' | 'friends' | string 默认值: doc 详情: 页面布局方式。 'home': 主页布局 'doc': 文章页布局,包括左侧侧边栏、文章内容..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-11-25T17:13:24.000Z"}],["meta",{"property":"article:modified_time","content":"2025-11-25T17:13:24.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://theme-plume.vuejs.press/en/config/frontmatter/basic/"}]]},"readingTime":{"minutes":4.38,"words":1314},"git":{"createdTime":1709915848000,"updatedTime":1764090804000,"contributors":[{"name":"pengzhanbo","username":"pengzhanbo","email":"volodymyr@foxmail.com","commits":17,"avatar":"https://avatars.githubusercontent.com/pengzhanbo?v=4","url":"https://github.com/pengzhanbo"},{"name":"huyunan","username":"huyunan","email":"40879024+huyunan@users.noreply.github.com","commits":1,"avatar":"https://avatars.githubusercontent.com/huyunan?v=4","url":"https://github.com/huyunan"},{"name":"wb_huyunan","username":"","email":"wb_huyunan@kuaishou.com","commits":1,"avatar":"https://gravatar.com/avatar/f448c9a8b2f313f1a1d90ad2f933ae2cf1827baa8252471a921f37d360ee9d91?d=retro"}],"changelog":[{"hash":"fc3676d6dcb89ab4f175c8e54d3b61697e0f9233","time":1764090804000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add support for {data-outline=\\"level\\"} attribute syntax for headings, close #757 (#759)"},{"hash":"ddb77a06a5bea91593d797ee307fcf2f115dd60b","time":1763644166000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add footer frontmatter"},{"hash":"4d2361a7046214fe0f4e4af01831107fd00e38ad","time":1759849989000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme)!: add collections support (#704)"},{"hash":"bb30b51a9b9eb9d0f990e1836751c663e29c6753","time":1758355213000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"docs: update docs"},{"hash":"5cbf0ddfcf54bad54476f398760120e387ea387b","time":1758352763000,"email":"40879024+huyunan@users.noreply.github.com","author":"huyunan","message":"feat(theme): add signdown frontmatter for home page (#691)","coAuthors":[{"name":"wb_huyunan","email":"wb_huyunan@kuaishou.com"}]},{"hash":"73ed8dc9c544be19318db4e36379f08c4a91a39b","time":1745034035000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add badge support for navbar and sidebar (#559)"},{"hash":"0fd6cac57412002f4d72dc10378789b529adc357","time":1742063370000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"refactor(theme): improve types and flat config (#524)"},{"hash":"6e037dcdc04aaeae17b9b759bd4fb5551ebe808e","time":1732103537000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add support for article copyright (#345)"},{"hash":"08a2d6107f91573ee84a701b682fac4d0e3c58f4","time":1731039445000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add changelog and improve contributors, close #319 (#329)"},{"hash":"b99d926c0b02deeb07c482c272f2139e89c0fbe7","time":1726425349000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add page title badge (#183)"}]},"autoDesc":true,"filePathRelative":"config/frontmatter/basic.md","headers":[],"bulletin":false}`),u={name:`basic.md`};function d(c,l,u,d,f,p){let m=t(`VPLink`);return n(),i(`div`,null,[l[13]||=o(`
通用 Frontmatter 配置,适用于 所有的文章。
示例:
---
title: 标题
createTime: 2024/03/02 20:01:09
permalink: /config/frontmatter/basic/
---类型: false | 'home' | 'doc' | 'custom' | 'page' | 'friends' | string
默认值: doc
详情:
页面布局方式。
'home': 主页布局'doc': 文章页布局,包括左侧侧边栏、文章内容、右侧侧边栏、导航栏、评论等'page': 仅包含导航栏 和 MD 文件内容,可以使用此布局方式自定义页面内容'friends': 友链页布局'custom': 仅包含 MD 文件内容,可以使用此布局方式完全自定义页面内容false: 等同于 customstring: 可以传入一个全局组件组件名,该组件将被应用为布局组件类型: string
默认值: ''
详情:
自定义页面额外的 类名。
类型: string
默认值: ''
详情:
文章标题。
主题会在文件创建时,自动填充 当前文件名作为 文章标题。
string | { text: string, type?: 'info' | 'tip' | 'warning' | 'danger' }在文章标题右侧显示 徽章。
类型: string
默认值: ''
详情:
文章创建时间。
主题会在文件创建时,自动填充 当前时间作为 文章创建时间。
类型: string
默认值: ''
详情:
文章永久链接。
主题会在文件创建时:
/article/ + nanoid 生成的 8 位随机字符串 作为 文章永久链接类型: boolean
默认值: true
详情:
当前文章内的 外部链接是否显示 外部链接图标。
类型: boolean
默认值: true
详情:
当前文章是否 显示 回到顶部 的按钮。
类型: boolean
默认值: true
详情:
当前文章是否 可评论。 仅在启用了评论功能的情况下生效。
类型: boolean | 'left'
默认值: true
详情:
当前文章是否 显示 右侧边栏。
当设置为 'left' 时,右侧边栏将显示在左侧。
类型: boolean
默认值: true
详情:
当前文章是否 显示 导航栏。
类型: false | number | [number, number] | 'deep'
默认值: [2, 3]
详情:
要显示的标题级别。
单个数字表示只显示该级别的标题。
如果传递的是一个元组,第一个数字是最小级别,第二个数字是最大级别。
'deep' 与 [2, 6] 相同,将显示从 <h2> 到 <h6> 的所有标题。
小技巧
在 markdown 内容的 标题后面,使用属性语法 {data-outline="level"} / {outline="level"}, 可以重新设置当前标题的后代标题的显示的最大级别。
例如:
## 标题 1 {data-outline="5"} <!-- 仅影响当前标题后代标题 -->
### 三级标题
#### 四级标题
##### 五级标题 <!-- 三四五级标题将显示在侧边栏 -->
###### 六级标题 <!-- 此标题不会显示在侧边栏 -->
## 标题 2 <!-- 同级别的标题不受影响 -->
### 三级标题 <!-- 默认仅显示到三级标题 -->
#### 四级标题 <!-- 四级标题不显示 -->需要注意的是, level 的值应该大于当前标题的级别,否则不会生效。
类型: string | { text: string, link: string, icon?: string }
默认值: ''
详情:
自定义当前文章的上一篇文章。
类型: string | { text: string, link: string, icon?: string }
默认值: ''
详情:
自定义当前文章的下一篇文章。
类型: boolean
默认值: true
详情:
当前文章是否 显示 阅读时长。
类型: boolean
默认值: true
详情:
当前文章是否 显示 最后更新时间。 最后更新时间 根据 git 提交时间自动填充。
类型: boolean
默认值: false
详情:
当前页面是否显示页面变更历史。
类型: boolean
默认值: true
详情:
当前文章是否 显示 文章编辑 按钮。
类型: boolean | WatermarkOptions
默认值: undefined 主题不启用水印,或不启用全局水印时,默认值为 false,启用全局水印则为 true。
详情: 配置当前文章 水印。
当类型为 boolean 时,表示是否启用水印。
当类型为 WatermarkOptions 时,表示当前页面水印配置。
可以参考 watermark-js-plus 。
类型: boolean
默认值: true
详情:
当前文章是否 显示 页脚信息。