chore: 升级 VuePress/Plume 并迁移至 collections 配置

- 将 vuepress 升至 2.0.0-rc.26、vuepress-theme-plume 升至 1.0.0-rc.192

- 用 defineCollections 替代已废弃的 blog + notes,新增 collections.ts 并删除 notes.ts

- 通过 package overrides 将 @vuepress/helper 固定为 rc.123,避免 dev 下 encodeSVG 缺失导致首页白屏

- 新增 .npmrc(legacy-peer-deps)以兼容当前 peer 依赖解析

未包含 docs/.vuepress/dist 等构建产物。

Made-with: Cursor
This commit is contained in:
祀梦
2026-03-29 10:01:40 +08:00
parent 8da5cf2593
commit f50d8ef8c2
7 changed files with 3849 additions and 2449 deletions

View File

@@ -10,16 +10,6 @@ import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
/** 博客目录名 → 中文分类展示Plume 从路径自动生成分类,此处仅改展示名) */
const BLOG_CATEGORY_LABEL_ZH: Record<string, string> = {
blog: '博客',
competition: '竞赛',
technology: '技术',
website: '网站',
elysia: '爱莉希雅',
collect: '合集',
}
export default defineUserConfig({
base: '/',
lang: 'zh-CN',
@@ -44,8 +34,6 @@ export default defineUserConfig({
theme: plumeTheme({
/* 站点域名,启动 SEO 优化 */
hostname: 'https://www.simengweb.com',
/* 博客文章页面链接前缀 */
article: '/article/',
/* 启用数学公式支持和Mermaid图表 */
markdown: {
@@ -66,21 +54,6 @@ export default defineUserConfig({
message: '愿每一份温柔都被世界珍藏 ✨',
copyright: '<a href="https://beian.miit.gov.cn/" target="_blank" aria-label="gongan filing address">沪ICP备2023010022号-1</a>©2025祀梦的个人博客'
},
/**
* 博客相关配置
*/
blog: {
postCover: {
layout: 'left',
// width: 300,
compact: true
},
categoriesTransform: (categories) =>
categories.map((c) => ({
...c,
name: BLOG_CATEGORY_LABEL_ZH[c.name] ?? c.name,
})),
},
/**
* 文章贡献者配置