Skip to content

Commit

Permalink
Merge pull request #20 from Cactus-proj/vue
Browse files Browse the repository at this point in the history
site: update vuepress
  • Loading branch information
inky authored May 19, 2024
2 parents 7085a3a + 46bfe8c commit 62face8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 43 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
66 changes: 28 additions & 38 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,28 @@
// https://v2.vuepress.vuejs.org/zh/reference/default-theme/config.html
module.exports = {
import { viteBundler } from '@vuepress/bundler-vite'
import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress'

// https://v2.vuepress.vuejs.org/zh/reference/config.html
export default defineUserConfig({
bundler: viteBundler(),

base: "/A-Philosophy-of-Software-Design-zh/",
locales: {
'/': {
lang: 'zh-CN',
title: "《软件设计的哲学》中文翻译",
title: "《软件设计的哲学》",
description: '《软件设计的哲学》中文翻译',
},
'/en/': {
lang: 'en-US',
title: '<A Philosophy of Software Design>',
description: '<A Philosophy of Software Design>',
}
},
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"
],

// https://v2.vuepress.vuejs.org/zh/guide/theme.html
// https://ecosystem.vuejs.press/zh/themes/default/config.html
theme: defaultTheme({
locales: {
'/': { // zh-CN
// 该语言在下拉菜单中的标签
Expand All @@ -62,6 +42,16 @@ module.exports = {
editLinkText: 'Edit this page on GitHub',
lastUpdatedText: 'Last Updated',
}
}
}
};
},

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: 'auto',
}),

})
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 62face8

Please sign in to comment.