vuepress-theme-plume/assets/basic-BD6b7rzi.js

15 lines
21 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 <code>{data-outline=\\"level\\"}</code> attribute syntax for headings, close #757 (#759)"},{"hash":"ddb77a06a5bea91593d797ee307fcf2f115dd60b","time":1763644166000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme): add <code>footer</code> 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 <code>signdown</code> 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 <code>changelog</code> and improve <code>contributors</code>, 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(`<h2 id="概述" tabindex="-1"><a class="header-anchor" href="#概述"><span>概述</span></a></h2><p>通用 Frontmatter 配置,适用于 所有的文章。</p><p>示例:</p><div class="language-md" data-highlighter="shiki" data-ext="md" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-md"><span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;">---</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">title</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">:</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 标题</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">createTime</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">:</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> 2024/03/02 20:01:09</span></span>
<span class="line"><span style="--shiki-light:#998418;--shiki-dark:#B8A965;">permalink</span><span style="--shiki-light:#999999;--shiki-dark:#666666;">:</span><span style="--shiki-light:#B56959;--shiki-dark:#C98A7D;"> /config/frontmatter/basic/</span></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-dark:#666666;">---</span></span></code></pre></div><h2 id="配置" tabindex="-1"><a class="header-anchor" href="#配置"><span>配置</span></a></h2><h3 id="pagelayout" tabindex="-1"><a class="header-anchor" href="#pagelayout"><span>pageLayout</span></a></h3><ul><li><p>类型: <code>false | &#39;home&#39; | &#39;doc&#39; | &#39;custom&#39; | &#39;page&#39; | &#39;friends&#39; | string</code></p></li><li><p>默认值: <code>doc</code></p></li><li><p>详情:</p><p>页面布局方式。</p><ul><li><code>&#39;home&#39;</code>: 主页布局</li><li><code>&#39;doc&#39;</code>: 文章页布局,包括左侧侧边栏、文章内容、右侧侧边栏、导航栏、评论等</li><li><code>&#39;page&#39;</code>: 仅包含导航栏 和 MD 文件内容,可以使用此布局方式自定义页面内容</li><li><code>&#39;friends&#39;</code>: 友链页布局</li><li><code>&#39;custom&#39;</code>: 仅包含 MD 文件内容,可以使用此布局方式完全自定义页面内容</li><li><code>false</code>: 等同于 <code>custom</code></li><li><code>string</code>: 可以传入一个全局组件组件名,该组件将被应用为布局组件</li></ul></li></ul><h3 id="pageclass" tabindex="-1"><a class="header-anchor" href="#pageclass"><span>pageClass</span></a></h3><ul><li><p>类型: <code>string</code></p></li><li><p>默认值: <code>&#39;&#39;</code></p></li><li><p>详情:</p><p>自定义页面额外的 类名。</p></li></ul><h3 id="title" tabindex="-1"><a class="header-anchor" href="#title"><span>title</span></a></h3><ul><li><p>类型: <code>string</code></p></li><li><p>默认值: <code>&#39;&#39;</code></p></li><li><p>详情:</p><p>文章标题。</p><p>主题会在文件创建时,自动填充 当前文件名作为 文章标题。</p></li></ul><h3 id="badge" tabindex="-1"><a class="header-anchor" href="#badge"><span>badge</span></a></h3><ul><li>类型: <code>string | { text: string, type?: &#39;info&#39; | &#39;tip&#39; | &#39;warning&#39; | &#39;danger&#39; }</code></li></ul><p>在文章标题右侧显示 徽章。</p><h3 id="createtime" tabindex="-1"><a class="header-anchor" href="#createtime"><span>createTime</span></a></h3><ul><li><p>类型: <code>string</code></p></li><li><p>默认值: <code>&#39;&#39;</code></p></li><li><p>详情:</p><p>文章创建时间。</p><p>主题会在文件创建时,自动填充 当前时间作为 文章创建时间。</p></li></ul><h3 id="permalink" tabindex="-1"><a class="header-anchor" href="#permalink"><span>permalink</span></a></h3><ul><li><p>类型: <code>string</code></p></li><li><p>默认值: <code>&#39;&#39;</code></p></li><li><p>详情:</p><p>文章永久链接。</p><p>主题会在文件创建时:</p><ul><li>博客类型的文章,自动填充 <code>/article/</code> + <code>nanoid 生成的 8 位随机字符串</code> 作为 文章永久链接</li><li>notes 目录下的文章,会根据 notes 的配置,自动填充 文章永久链接</li></ul></li></ul><h3 id="externallinkicon" tabindex="-1"><a class="header-anchor" href="#externallinkicon"><span>externalLinkIcon</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章内的 外部链接是否显示 外部链接图标。</p></li></ul><h3 id="backtotop" tabindex="-1"><a class="header-anchor" href="#backtotop"><span>backToTop</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 回到顶部 的按钮。</p></li></ul><h3 id="comments" tabindex="-1"><a class="header-anchor" href="#comments"><span>comments</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 可评论。 仅在启用了评论功能的情况下生效。</p></li></ul><h3 id="aside" tabindex="-1"><a class="header-anchor" href="#aside"><span>aside</span></a></h3><ul><li><p>类型: <code>boolean | &#39;left&#39;</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 右侧边栏。</p><p>当设置为 <code>&#39;left&#39;</code> 时,右侧边栏将显示在左侧。</p></li></ul><h3 id="navbar" tabindex="-1"><a class="header-anchor" href="#navbar"><span>navbar</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 导航栏。</p></li></ul><h3 id="outline" tabindex="-1"><a class="header-anchor" href="#outline"><span>outline</span></a></h3><ul><li><p>类型: <code>false | number | [number, number] | &#39;deep&#39;</code></p></li><li><p>默认值: <code>[2, 3]</code></p></li><li><p>详情:</p><p>要显示的标题级别。</p><p>单个数字表示只显示该级别的标题。</p><p>如果传递的是一个元组,第一个数字是最小级别,第二个数字是最大级别。</p><p><code>&#39;deep&#39;</code> 与 <code>[2, 6]</code> 相同,将显示从 <code>&lt;h2&gt;</code> 到 <code>&lt;h6&gt;</code> 的所有标题。</p></li></ul><div class="hint-container tip"><p class="hint-container-title">小技巧</p><p>在 markdown 内容的 标题后面,使用属性语法 <code>{data-outline=&quot;level&quot;}</code> / <code>{outline=&quot;level&quot;}</code> 可以重新设置当前标题的后代标题的显示的最大级别。</p><p><strong>例如</strong>:</p><div class="language-md line-numbers-mode" data-highlighter="shiki" data-ext="md" style="--shiki-light:#393a34;--shiki-dark:#dbd7caee;--shiki-light-bg:#ffffff;--shiki-dark-bg:#121212;"><pre class="shiki shiki-themes vitesse-light vitesse-dark vp-code"><code class="language-md"><span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">##</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 标题 1 </span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;" class="highlighted-word">{data-outline=&quot;5&quot;}</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> </span><span style="--shiki-light:#A0ADA0;--shiki-light-font-weight:bold;--shiki-dark:#758575DD;--shiki-dark-font-weight:bold;">&lt;!-- 仅影响当前标题后代标题 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">###</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 三级标题</span></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">####</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 四级标题</span></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">#####</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 五级标题 </span><span style="--shiki-light:#A0ADA0;--shiki-light-font-weight:bold;--shiki-dark:#758575DD;--shiki-dark-font-weight:bold;">&lt;!-- 三四五级标题将显示在侧边栏 --&gt;</span></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">######</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 六级标题 </span><span style="--shiki-light:#A0ADA0;--shiki-light-font-weight:bold;--shiki-dark:#758575DD;--shiki-dark-font-weight:bold;">&lt;!-- 此标题不会显示在侧边栏 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">##</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 标题 2 </span><span style="--shiki-light:#A0ADA0;--shiki-light-font-weight:bold;--shiki-dark:#758575DD;--shiki-dark-font-weight:bold;">&lt;!-- 同级别的标题不受影响 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">###</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 三级标题 </span><span style="--shiki-light:#A0ADA0;--shiki-light-font-weight:bold;--shiki-dark:#758575DD;--shiki-dark-font-weight:bold;">&lt;!-- 默认仅显示到三级标题 --&gt;</span></span>
<span class="line"><span style="--shiki-light:#999999;--shiki-light-font-weight:bold;--shiki-dark:#666666;--shiki-dark-font-weight:bold;">####</span><span style="--shiki-light:#1C6B48;--shiki-light-font-weight:bold;--shiki-dark:#4D9375;--shiki-dark-font-weight:bold;"> 四级标题 </span><span style="--shiki-light:#A0ADA0;--shiki-light-font-weight:bold;--shiki-dark:#758575DD;--shiki-dark-font-weight:bold;">&lt;!-- 四级标题不显示 --&gt;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>需要注意的是, <code>level</code> 的值应该大于当前标题的级别,否则不会生效。</p></div><h3 id="prev" tabindex="-1"><a class="header-anchor" href="#prev"><span>prev</span></a></h3><ul><li><p>类型: <code>string | { text: string, link: string, icon?: string }</code></p></li><li><p>默认值: <code>&#39;&#39;</code></p></li><li><p>详情:</p><p>自定义当前文章的上一篇文章。</p><ul><li>博客类型的文章,主题根据时间排序,自动填充上一篇文章的标题和链接。</li><li>notes 类型的文章,主题根据 note sidebar 配置,自动填充上一篇文章的标题和链接。</li></ul></li></ul><h3 id="next" tabindex="-1"><a class="header-anchor" href="#next"><span>next</span></a></h3><ul><li><p>类型: <code>string | { text: string, link: string, icon?: string }</code></p></li><li><p>默认值: <code>&#39;&#39;</code></p></li><li><p>详情:</p><p>自定义当前文章的下一篇文章。</p><ul><li>博客类型的文章,主题根据时间排序,自动填充下一篇文章的标题和链接。</li><li>notes 类型的文章,主题根据 note sidebar 配置,自动填充下一篇文章的标题和链接。</li></ul></li></ul><h3 id="readingtime" tabindex="-1"><a class="header-anchor" href="#readingtime"><span>readingTime</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 阅读时长。</p></li></ul><h3 id="lastupdated" tabindex="-1"><a class="header-anchor" href="#lastupdated"><span>lastUpdated</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 最后更新时间。 最后更新时间 根据 git 提交时间自动填充。</p></li></ul><h3 id="contributors" tabindex="-1"><a class="header-anchor" href="#contributors"><span>contributors</span></a></h3>`,40),s(`ul`,null,[l[5]||=s(`li`,null,[s(`p`,null,[a(`类型: `),s(`code`,null,`boolean`)])],-1),l[6]||=s(`li`,null,[s(`p`,null,[a(`默认值: `),s(`code`,null,`true | string | string[]`)])],-1),s(`li`,null,[l[2]||=s(`p`,null,`详情:`,-1),l[3]||=s(`p`,null,`当前文章是否 显示 贡献者。 贡献者 根据 git 提交者自动填充。`,-1),l[4]||=s(`p`,null,`如果您的文章来源于第三方, git 提交不能完整列出所有的作者,您可以在此处补充贡献者。`,-1),s(`p`,null,[l[1]||=a(`额外信息补充请查看 `,-1),r(m,{href:`../../guide/features/contributors.md#info`},{default:e(()=>[...l[0]||=[a(`contributors`,-1)]]),_:1})])])]),l[14]||=o(`<h3 id="changelog" tabindex="-1"><a class="header-anchor" href="#changelog"><span>changelog</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>false</code></p></li><li><p>详情:</p><p>当前页面是否显示页面变更历史。</p></li></ul><h3 id="copyright" tabindex="-1"><a class="header-anchor" href="#copyright"><span>copyright</span></a></h3>`,3),s(`ul`,null,[l[11]||=s(`li`,null,[s(`p`,null,[a(`类型: `),s(`code`,null,`boolean | CopyrightLicense | CopyrightFrontmatter`)])],-1),l[12]||=s(`li`,null,[s(`p`,null,[a(`默认值: `),s(`code`,null,`false`)])],-1),s(`li`,null,[l[9]||=s(`p`,null,`详情:`,-1),l[10]||=s(`p`,null,`当前文章是否 显示 版权信息。`,-1),s(`p`,null,[l[8]||=a(`完整信息请查看 `,-1),r(m,{href:`../../guide/features/copyright.md`},{default:e(()=>[...l[7]||=[a(`copyright`,-1)]]),_:1})])])]),l[15]||=o(`<h3 id="editlink" tabindex="-1"><a class="header-anchor" href="#editlink"><span>editLink</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 文章编辑 按钮。</p></li></ul><h3 id="watermark" tabindex="-1"><a class="header-anchor" href="#watermark"><span>watermark</span></a></h3><ul><li><p>类型: <code>boolean | WatermarkOptions</code></p></li><li><p>默认值: <code>undefined</code> 主题不启用水印,或不启用全局水印时,默认值为 <code>false</code>,启用全局水印则为 <code>true</code>。</p></li><li><p>详情: 配置当前文章 水印。</p><p>当类型为 boolean 时,表示是否启用水印。</p><p>当类型为 WatermarkOptions 时,表示当前页面水印配置。</p><p>可以参考 <a href="https://zhensherlock.github.io/watermark-js-plus/zh/config/" target="_blank" rel="noopener noreferrer">watermark-js-plus</a> 。</p></li></ul><h3 id="footer" tabindex="-1"><a class="header-anchor" href="#footer"><span>footer</span></a></h3><ul><li><p>类型: <code>boolean</code></p></li><li><p>默认值: <code>true</code></p></li><li><p>详情:</p><p>当前文章是否 显示 页脚信息。</p></li></ul>`,6)])}var f=c(u,[[`render`,d]]);export{l as _pageData,f as default};