mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
1 line
8.7 KiB
JavaScript
1 line
8.7 KiB
JavaScript
import{P as e,f as t,h as n}from"./runtime-core.esm-bundler-CZvn3YaB.js";import{t as r}from"./plugin-vue_export-helper-CxTVcLa7.js";var i=JSON.parse(`{"path":"/article/6pa64b1n/","title":"1.0.0-rc.102 至 rc.103 更新说明 | 博客","lang":"zh-CN","frontmatter":{"title":"1.0.0-rc.102 至 rc.103 更新说明","createTime":"2024/09/24 23:45:49","permalink":"/article/6pa64b1n/","description":"这两个版本做了一些 破坏性的更新,主要围绕以下两个方面: 适配 Vuepress Guidelines 更新 vuepress-plugin-md-enhance 插件,并迁移其中的部分功能,改用 VuePress 官方插件 适配 VuePress Guidelines VuePress 推出了 主题开发指南。 这一举措旨在规范化主题开发流程,并提出了...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"1.0.0-rc.102 至 rc.103 更新说明\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-10-07T15:13:09.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://theme-plume.vuejs.press/article/6pa64b1n/"}],["meta",{"property":"og:site_name","content":"Plume 主题"}],["meta",{"property":"og:title","content":"1.0.0-rc.102 至 rc.103 更新说明"}],["meta",{"property":"og:description","content":"这两个版本做了一些 破坏性的更新,主要围绕以下两个方面: 适配 Vuepress Guidelines 更新 vuepress-plugin-md-enhance 插件,并迁移其中的部分功能,改用 VuePress 官方插件 适配 VuePress Guidelines VuePress 推出了 主题开发指南。 这一举措旨在规范化主题开发流程,并提出了..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-10-07T15:13:09.000Z"}],["meta",{"property":"article:modified_time","content":"2025-10-07T15:13:09.000Z"}]]},"readingTime":{"minutes":3,"words":899},"git":{"createdTime":1727206661000,"updatedTime":1759849989000,"contributors":[{"name":"pengzhanbo","username":"pengzhanbo","email":"volodymyr@foxmail.com","commits":5,"avatar":"https://avatars.githubusercontent.com/pengzhanbo?v=4","url":"https://github.com/pengzhanbo"}],"changelog":[{"hash":"4d2361a7046214fe0f4e4af01831107fd00e38ad","time":1759849989000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat(theme)!: add collections support (#704)"},{"hash":"f47df1449b94f06bdf00afa33d32889f9b2ac845","time":1733634324000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"docs: update docs"},{"hash":"ca21d1b8cb55b64b395361aea2b131be91d5e4e1","time":1727280846000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"feat: add support optional icon for file-tree and code-tabs (#216)"},{"hash":"4644765090e9a69a26e92f1cde9c5e0413b69829","time":1727278894000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"chore: tweak"},{"hash":"43d3e562303426279103479a84039c3684b95ec6","time":1727206661000,"email":"volodymyr@foxmail.com","author":"pengzhanbo","message":"chore: tweak"}]},"autoDesc":true,"filePathRelative":"blog/3.更新说明/102-103.md","headers":[],"categoryList":[{"id":"7a3973","sort":3,"name":"更新说明"}],"bulletin":false}`),a={name:`102-103.md`};function o(r,i,a,o,s,c){return e(),t(`div`,null,[...i[0]||=[n(`<p>这两个版本做了一些 破坏性的更新,主要围绕以下两个方面:</p><ul><li>适配 <a href="https://ecosystem.vuejs.press/zh/themes/guidelines.html" target="_blank" rel="noopener noreferrer">Vuepress Guidelines</a></li><li>更新 vuepress-plugin-md-enhance 插件,并迁移其中的部分功能,改用 VuePress 官方插件</li></ul><h2 id="适配-vuepress-guidelines" tabindex="-1"><a class="header-anchor" href="#适配-vuepress-guidelines"><span>适配 VuePress Guidelines</span></a></h2><p>VuePress 推出了 <a href="https://ecosystem.vuejs.press/zh/themes/guidelines.html" target="_blank" rel="noopener noreferrer">主题开发指南</a>。</p><p>这一举措旨在规范化主题开发流程,并提出了主题开发过程中需要遵守的几个约定,这包括:</p><ul><li>约定 CSS 变量命名规范,并约束 主要 CSS 变量的命名,如 <code>--vp-c-accent</code>,<code>--vp-c-text</code> 等。</li><li>约定 主要的 HTML 元素容器应添加指定的 属性名,如 <code>vp-content</code>, <code>vp-navbar</code> 等。</li><li>约定 双主题模式应使用 <code>[data-theme="light"]</code> 和 <code>[data-theme="dark"]</code> 来区分。</li></ul><p>围绕这几个约定,可以使得 VuePress 的 开发者们,可以很方便的 开发出 更具通用性的 主题和插件。</p><p><code>plume</code> 主题也同样适配了这些约定:</p><ul><li><p><strong>CSS 变量命名的变更</strong> 和 <strong>HTML 元素添加属性</strong>,对于用户是无感知的,您无需关注这方面是否会有影响。</p></li><li><p><strong>双主题模式</strong>,对于有自定义主题需求的用户而言,如果您有重新定义深色模式下的样式,则需要做出一些调整:</p><p>在 CSS 中的 <code>.dark</code> 类应替换为 <code>[data-theme="dark"]</code>,请不用担心替换会带来额外的副作用,它们在 CSS 中的 优先级是相同的,您可以安全的执行替换操作。</p></li></ul><h2 id="vuepress-plugin-md-enhance-插件迁移" tabindex="-1"><a class="header-anchor" href="#vuepress-plugin-md-enhance-插件迁移"><span>vuepress-plugin-md-enhance 插件迁移</span></a></h2><p><a href="https://plugin-md-enhance.vuejs.press/zh/" target="_blank" rel="noopener noreferrer">vuepress-plugin-md-enhance</a> 提供了非常多的功能支持,但与之带来的困难是, 它变得越来越臃肿,变得难以维护了。</p><p>我在 <a href="https://github.com/vuepress-theme-hope/vuepress-theme-hope/issues/4130" target="_blank" rel="noopener noreferrer">#4130</a> 中提出了拆分迁移的计划。 因此从 <code>@2.0.0-rc.53</code> 版本开始,逐步开始拆分迁移的计划。</p><p>截止到 <code>@2.0.0-rc.54</code> 版本,已经拆分出了以下插件:</p><ul><li><a href="https://ecosystem.vuejs.press/zh/plugins/markdown/markdown-hint.html" target="_blank" rel="noopener noreferrer">@vuepress/plugin-markdown-hint</a></li><li><a href="https://ecosystem.vuejs.press/zh/plugins/markdown/markdown-image.html" target="_blank" rel="noopener noreferrer">@vuepress/plugin-markdown-image</a></li><li><a href="https://ecosystem.vuejs.press/zh/plugins/markdown/markdown-math.html" target="_blank" rel="noopener noreferrer">@vuepress/plugin-markdown-math</a></li><li><a href="https://ecosystem.vuejs.press/zh/plugins/markdown/markdown-tab.html" target="_blank" rel="noopener noreferrer">@vuepress/plugin-markdown-tab</a></li></ul><p>当前主题也将 vuepress-plugin-md-enhance 更新到 <code>@2.0.0-rc.54</code> 版本,因此,也重新接入了上述的插件。</p><ul><li><p><code>@vuepress/plugin-markdown-hint</code> 提供了 提示容器 和 <code>github alerts</code> 支持,主题已内置了该插件,对于该插件的迁移, 用户是无需做任何修改的,您可以继续使用这些功能。</p></li><li><p><code>@vuepress/plugin-markdown-image</code> 提供了图片支持,主题已内置了该插件,但不启用该插件的默认功能, 因此,如果您使用了如 <code>plugins.mdEnhance.imgSize</code> 配置项,您需要通过<code>plugins.markdownImage</code> 重新进行配置。</p></li><li><p><code>@vuepress/plugin-markdown-math</code> 提供了数学公式支持,主题已内置了该插件,并默认启用了 <code>katex</code> 支持。</p></li><li><p><code>@vuepress/plugin-markdown-tab</code> 提供了 Tab 容器 和 代码分组支持,主题重写了插件部分内容,对 <code>code-tabs</code> 容器 做了一些调整,支持在 代码分组标题中显示 相关联的图标。</p></li></ul><h2 id="其它更新" tabindex="-1"><a class="header-anchor" href="#其它更新"><span>其它更新</span></a></h2><ul><li><p><strong>文件树</strong> 现在支持 不同的图标方案,可在 <code>:::file-tree</code> 后跟随 <code>:simple-icon</code> / <code>:colored-icon</code> 切换。</p><p>默认为 colored-icon,如果切换为 simple-icon,则不再根据 文件夹名和文件扩展名匹配不同的图标,仅显示默认的 文件夹图标和文件图标。</p></li><li><p><strong>代码块分组</strong> 的标题现在支持显示 图标。当作为 文件名时,与 <strong>文件树</strong> 采用相同的图标解析规则,还额外支持 不同的技术、框架、语言的名称图标。</p></li><li><p>优化了 容器、任务列表、脚注、等的样式。</p></li></ul>`,18)]])}var s=r(a,[[`render`,o]]);export{i as _pageData,s as default}; |