Skip to content

Commit be05540

Browse files
committed
perf: 升级vuepress相关版本依赖,修改新版本模块配置
1 parent 2315590 commit be05540

File tree

6 files changed

+1171
-667
lines changed

6 files changed

+1171
-667
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
## 锁定版本
22
engine-strict = true
33
shamefully-hoist=true
4-
registry=https://registry.npmmirror.com

docs/.vuepress/theme/sidebar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { sidebar } from 'vuepress-theme-hope'
22
import { ServerEndSidebar } from '../../server-end/server-end.sidebar'
33
import { EggSidebar } from '../../server-end/framework/egg/eggSidebar'
44
import { DevelopSkillSidebar } from '../../develop-skill/develop-skill.sidebar'
5-
// import {soloAlgorithmSidebar} from "../../solo-algorithm/solo-algorithm.sidebar";
5+
import { soloAlgorithmSidebar } from '../../solo-algorithm/solo-algorithm.sidebar'
66
import { JobChanceSidebar } from '../../job-chance/job-chance.sidebar'
77
import { ReadBooksSidebar } from '../../read-books/read-books.sidebar'
88
import { MicroserviceSidebar } from '../../microservice/microserviceSidebar'
@@ -41,7 +41,7 @@ export default sidebar({
4141
'/server-end/orm/sequelize': SequelizeOrmSidebar,
4242
'/server-end/orm/typeorm': TypeormSidebar,
4343
'/develop-skill': DevelopSkillSidebar,
44-
// "/solo-algorithm": soloAlgorithmSidebar,
44+
'/solo-algorithm': soloAlgorithmSidebar,
4545
'/read-books': ReadBooksSidebar,
4646
'/job-chance': JobChanceSidebar,
4747
'/microservice': MicroserviceSidebar,

docs/.vuepress/theme/theme.ts

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { hopeTheme } from 'vuepress-theme-hope'
2+
import { markdownImagePlugin } from '@vuepress/plugin-markdown-image'
23
import { AUTHOR_INFO, COPYRIGHT, FOOTER_HTML_INFO } from './constant'
34
import { i18n, searchProCNLocals } from './i18n'
45
import navbar from './navbar'
@@ -74,19 +75,23 @@ export const themeConfig = {
7475
copyright: false,
7576
// 开启博客功能
7677
blog: false,
77-
// 代码块
78-
mdEnhance: {
79-
// card:true,
80-
codetabs: true,
81-
tasklist: true, // 支持任务列表
78+
// 图片增强,参考:https://ecosystem.vuejs.press/zh/plugins/markdown/markdown-image.html
79+
markdownImage: markdownImagePlugin({
8280
// 启用 figure
8381
figure: true,
8482
// 启用图片懒加载
85-
imgLazyload: true,
83+
lazyload: true,
8684
// 启用图片标记
87-
imgMark: true,
85+
mark: true,
8886
// 启用图片大小
89-
imgSize: true,
87+
size: true,
88+
}),
89+
// 代码块
90+
mdEnhance: {
91+
// card:true,
92+
codetabs: true,
93+
// 支持任务列表
94+
tasklist: true,
9095
playground: {
9196
presets: ['ts', 'vue'],
9297
},
@@ -168,13 +173,48 @@ export const themeConfig = {
168173
},
169174
// 代码高亮:https://theme-hope.vuejs.press/zh/guide/feature/code-block.html
170175
shiki: {
171-
langs: ['ts', 'js', 'json', 'vue', 'json5', 'bash', 'diff', 'c', 'c++', 'dockerfile', 'nginx', 'proto'],
176+
langs: ['ts', 'js', 'json', 'vue', 'json5', 'bash', 'diff', 'c', 'c++', 'dockerfile', 'nginx', 'proto', 'java', 'javascript', 'typescript'],
172177
// 你想要使用的主题
173178
themes: {
174179
light: 'one-light',
175180
dark: 'one-dark-pro',
176181
},
177182
},
183+
// shiki: shikiPlugin({
184+
// // 配置项
185+
// langs: [
186+
// 'java',
187+
// 'javascript',
188+
// 'typescript',
189+
// 'html',
190+
// 'css',
191+
// 'json',
192+
// 'yaml',
193+
// 'markdown',
194+
// 'xml',
195+
// 'bat',
196+
// 'shell',
197+
// 'powershell',
198+
// 'sql',
199+
// 'properties',
200+
// 'md',
201+
// 'vue',
202+
// 'tsx',
203+
// 'jsx',
204+
// 'scss',
205+
// 'less',
206+
// 'sass',
207+
// 'vue-html',
208+
// 'nginx',
209+
// 'tex',
210+
// ],
211+
// themes: {
212+
// // light: 'one-light',
213+
// // dark: 'one-dark-pro',
214+
// dark: 'dark-plus',
215+
// light: 'light-plus',
216+
// },
217+
// }),
178218
},
179219
}),
180220
}

package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,40 +21,39 @@
2121
"dev": "vuepress dev docs",
2222
"lint": "npx fa lint",
2323
"lint:fix": "npx fa lint --fix",
24-
"build": "vuepress build docs --clean-temp --clean-cache",
24+
"build": "npx vuepress build docs --clean-temp --clean-cache",
2525
"build:proxy": "PROXY_DOMAIN=true vuepress build docs --clean-temp --clean-cache",
2626
"deploy:vercel": "vercel --prod",
2727
"release": "npx fa release --vip"
2828
},
2929
"devDependencies": {
3030
"@142vip/fairy-cli": "^0.0.3-alpha.11",
3131
"@142vip/release-version": "^0.0.1-alpha.9",
32-
"@142vip/utils": "^0.0.1-alpha.4",
32+
"@142vip/utils": "0.0.1-alpha.4",
3333
"@antfu/eslint-config": "^2.27.3",
3434
"@commitlint/cli": "^18.6.1",
3535
"@commitlint/config-conventional": "^18.6.3",
3636
"@vue/repl": "^4.3.1",
37-
"@vuepress/bundler-vite": "2.0.0-rc.14",
37+
"@vuepress/bundler-vite": "2.0.0-rc.15",
38+
"@vuepress/plugin-markdown-image": "2.0.0-rc.30",
3839
"dashjs": "^4.7.4",
3940
"enquirer": "^2.4.1",
40-
"eslint": "^8.55.0",
41+
"eslint": "8.55.0",
4142
"eslint-plugin-format": "^0.1.2",
4243
"hls.js": "^1.5.13",
4344
"husky": "^8.0.3",
4445
"lint-staged": "^15.2.7",
4546
"markmap-cli": "^0.15.8",
4647
"mermaid": "^10.9.1",
4748
"reveal.js": "^5.1.0",
49+
"sass-embedded": "^1.79.3",
4850
"shelljs": "^0.8.5",
4951
"typescript": "^5.5.4",
5052
"vercel": "^32.7.2",
5153
"vidstack": "^1.11.30",
52-
"vue": "^3.4.34",
53-
"vuepress": "2.0.0-rc.14",
54-
"vuepress-plugin-components": "2.0.0-rc.52",
55-
"vuepress-plugin-md-enhance": "2.0.0-rc.52",
56-
"vuepress-plugin-search-pro": "2.0.0-rc.52",
57-
"vuepress-theme-hope": "2.0.0-rc.52",
54+
"vuepress": "2.0.0-rc.15",
55+
"vuepress-plugin-search-pro": "2.0.0-rc.53",
56+
"vuepress-theme-hope": "2.0.0-rc.53",
5857
"webpack": "^5.93.0",
5958
"xmind-embed-viewer": "^1.2.0"
6059
}

0 commit comments

Comments
 (0)