From 724667f1b203300227d0a44bb9cf2d0751eb178d Mon Sep 17 00:00:00 2001 From: inky Date: Sun, 19 May 2024 18:03:43 -0500 Subject: [PATCH] site: update vuepress --- .gitignore | 12 ++++--- docs/.vuepress/config.js | 75 +++++----------------------------------- package.json | 4 ++- 3 files changed, 19 insertions(+), 72 deletions(-) diff --git a/.gitignore b/.gitignore index 00f0376a..ddcb356b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,13 @@ # vuepress@next node_modules/ -.temp -.cache -# vuepress@v1 -docs/.vuepress/dist/ + +# vuepress@v2 +# VuePress 默认临时文件目录 +docs/.vuepress/.temp +# VuePress 默认缓存目录 +docs/.vuepress/.cache +# VuePress 默认构建生成的静态文件目录 +docs/.vuepress/dist package-lock.json yarn.lock diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ff19aea8..15017754 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,67 +1,8 @@ -// https://v2.vuepress.vuejs.org/zh/reference/default-theme/config.html -module.exports = { - base: "/A-Philosophy-of-Software-Design-zh/", - locales: { - '/': { - lang: 'zh-CN', - title: "《软件设计的哲学》中文翻译", - }, - '/en/': { - lang: 'en-US', - title: '', - } - }, - themeConfig: { - repo: "Cactus-proj/A-Philosophy-of-Software-Design-zh", - docsRepo: "Cactus-proj/A-Philosophy-of-Software-Design-zh", - docsBranch: "main", - docsDir: "docs", - contributors: false, - sidebarDepth: 2, - sidebar: [ - "preface.md", - "ch01.md", - "ch02.md", - "ch03.md", - "ch04.md", - "ch05.md", - "ch06.md", - "ch07.md", - "ch08.md", - "ch09.md", - "ch10.md", - "ch11.md", - "ch12.md", - "ch13.md", - "ch14.md", - "ch15.md", - "ch16.md", - "ch17.md", - "ch18.md", - "ch19.md", - "ch20.md", - "ch21.md", - "summary.md" - ], - locales: { - '/': { // zh-CN - // 该语言在下拉菜单中的标签 - selectLanguageName: '简体中文', - // 多语言下拉菜单的标题 - selectLanguageText: '选择语言', - selectLanguageAriaselectLanguageName: '选择语言', - editLink: true, - editLinkText: '在 GitHub 上编辑此页', - lastUpdatedText: '上次更新', - }, - '/en/': { - selectLanguageName: 'English', - selectLanguageText: 'Languages', - selectLanguageAriaselectLanguageName: 'Select language', - editLink: false, - editLinkText: 'Edit this page on GitHub', - lastUpdatedText: 'Last Updated', - } - } - } -}; +import { viteBundler } from '@vuepress/bundler-vite' +import { defaultTheme } from '@vuepress/theme-default' +import { defineUserConfig } from 'vuepress' + +export default defineUserConfig({ + bundler: viteBundler(), + theme: defaultTheme(), +}) diff --git a/package.json b/package.json index 0ea5a550..f72e9fa2 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "build": "vuepress build docs" }, "devDependencies": { - "vuepress": "^2.0.0-beta.38" + "@vuepress/bundler-vite": "^2.0.0-rc.11", + "@vuepress/theme-default": "^2.0.0-rc.30", + "vuepress": "^2.0.0-rc.11" } }