Skip to content

Commit 7703240

Browse files
committed
feat: update deps and use pnpm
1 parent c1fc5ac commit 7703240

File tree

14 files changed

+6304
-78
lines changed

14 files changed

+6304
-78
lines changed

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
/node_modules
2-
/package-lock.json
1+
node_modules/
32
# *.drawio
43
*.drawio.bkp
54
.DS_Store
65
# VS Code Config file
76
.vscode/
8-
# Vuepress Cache
9-
.cache/
10-
# Vuepress Temp
11-
.temp/
12-
# Vuepress Output
7+
# VuePress Cache
8+
**/.vuepress/.cache/
9+
# VuePress Temp
10+
**/.vuepress/.temp/
11+
# VuePress Output
1312
dist/
1413
# Build files
1514
packages/*/lib/

docs/.vuepress/config.ts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { defineUserConfig } from "vuepress";
2-
import { themeConfig } from "./themeConfig";
3-
import { searchPlugin } from "@vuepress/plugin-search";
2+
import { searchProPlugin } from "vuepress-plugin-search-pro";
3+
4+
import theme from "./theme.js";
45

56
export default defineUserConfig({
67
dest: "./dist",
7-
theme: themeConfig,
8-
shouldPrefetch: false,
8+
99
title: "JavaGuide(Java面试+学习指南)",
1010
description:
1111
"「Java学习指北+Java面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,复习 Java 知识点,首选 JavaGuide! ",
12+
1213
head: [
1314
// meta
1415
["meta", { name: "robots", content: "all" }],
@@ -46,25 +47,16 @@ export default defineUserConfig({
4647
["link", { rel: "stylesheet", href: "/iconfont/iconfont.css" }],
4748
["link", { rel: "icon", href: "/favicon.ico" }],
4849
],
50+
4951
locales: {
5052
"/": {
5153
lang: "zh-CN",
5254
},
5355
},
54-
plugins: [
55-
searchPlugin({
56-
// https://v2.vuepress.vuejs.org/zh/reference/plugin/search.html
57-
// 排除首页
58-
isSearchable: (page) => page.path !== "/",
59-
maxSuggestions: 10,
60-
hotKeys: ["s", "/"],
61-
// 用于在页面的搜索索引中添加额外字段
62-
getExtraFields: () => [],
63-
locales: {
64-
"/": {
65-
placeholder: "搜索",
66-
},
67-
},
68-
}),
69-
],
56+
57+
theme,
58+
59+
plugins: [searchProPlugin({ indexContent: true })],
60+
61+
shouldPrefetch: false,
7062
});

docs/.vuepress/navbar.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { navbar } from "vuepress-theme-hope";
22

3-
export const navbarConfig = navbar([
3+
export default navbar([
44
{ text: "面试指南", icon: "java", link: "/home.md" },
55
{ text: "开源项目", icon: "github", link: "/open-source-project/" },
66
{ text: "技术书籍", icon: "book", link: "/books/" },
7-
{ text: "程序人生", icon: "article", link: "/high-quality-technical-articles/" },
7+
{
8+
text: "程序人生",
9+
icon: "article",
10+
link: "/high-quality-technical-articles/",
11+
},
812
{
913
text: "网站相关",
1014
icon: "about",

docs/.vuepress/public/iconfont/iconfont.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@font-face {
22
font-family: "iconfont"; /* Project id 2922463 */
3-
src: url('iconfont.woff2?t=1660530571134') format('woff2'),
4-
url('iconfont.woff?t=1660530571134') format('woff'),
5-
url('iconfont.ttf?t=1660530571134') format('truetype');
3+
src: url("iconfont.woff2?t=1660530571134") format("woff2"),
4+
url("iconfont.woff?t=1660530571134") format("woff"),
5+
url("iconfont.ttf?t=1660530571134") format("truetype");
66
}
77

88
.iconfont {
@@ -220,4 +220,3 @@
220220
.icon-intellijidea:before {
221221
content: "\ebd1";
222222
}
223-
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
export const aboutTheAuthor = [
1+
import { arraySidebar } from "vuepress-theme-hope";
2+
3+
export const aboutTheAuthor = arraySidebar([
24
{
35
text: "个人经历",
46
icon: "zuozhe",
5-
collapsable: false,
7+
collapsible: false,
68
children: [
79
"internet-addiction-teenager",
810
"my-college-life",
@@ -14,12 +16,12 @@ export const aboutTheAuthor = [
1416
{
1517
text: "杂谈",
1618
icon: "chat",
17-
collapsable: false,
19+
collapsible: false,
1820
children: [
1921
"writing-technology-blog-six-years",
2022
"my-article-was-stolen-and-made-into-video-and-it-became-popular",
2123
"dog-that-copies-other-people-essay",
2224
"zhishixingqiu-two-years",
2325
],
2426
},
25-
];
27+
]);

docs/.vuepress/sidebar/books.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const books = [
1+
import { arraySidebar } from "vuepress-theme-hope";
2+
3+
export const books = arraySidebar([
24
{
35
text: "计算机基础",
46
link: "cs-basics",
@@ -30,4 +32,4 @@ export const books = [
3032
link: "distributed-system",
3133
icon: "distributed-network",
3234
},
33-
];
35+
]);

docs/.vuepress/sidebar/high-quality-technical-articles.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
export const highQualityTechnicalArticles = [
1+
import { arraySidebar } from "vuepress-theme-hope";
2+
3+
export const highQualityTechnicalArticles = arraySidebar([
24
{
35
text: "练级攻略",
46
icon: "et-performance",
57
prefix: "advanced-programmer/",
6-
collapsable: false,
8+
collapsible: false,
79
children: [
810
"the-growth-strategy-of-the-technological-giant",
911
"seven-tips-for-becoming-an-advanced-programmer",
@@ -14,7 +16,7 @@ export const highQualityTechnicalArticles = [
1416
text: "个人经历",
1517
icon: "experience",
1618
prefix: "personal-experience/",
17-
collapsable: false,
19+
collapsible: false,
1820
children: [
1921
"four-year-work-in-tencent-summary",
2022
"two-years-of-back-end-develop--experience-in-didi&toutiao",
@@ -26,7 +28,7 @@ export const highQualityTechnicalArticles = [
2628
text: "程序员",
2729
icon: "code",
2830
prefix: "programmer/",
29-
collapsable: false,
31+
collapsible: false,
3032
children: [
3133
"how-do-programmers-publish-a-technical-book",
3234
"efficient-book-publishing-and-practice-guide",
@@ -36,7 +38,7 @@ export const highQualityTechnicalArticles = [
3638
text: "面试",
3739
icon: "interview",
3840
prefix: "interview/",
39-
collapsable: false,
41+
collapsible: false,
4042
children: [
4143
"the-experience-of-get-offer-from-over-20-big-companies",
4244
"the-experience-and-thinking-of-an-interview-experienced-by-an-older-programmer",
@@ -52,10 +54,10 @@ export const highQualityTechnicalArticles = [
5254
text: "工作",
5355
icon: "work",
5456
prefix: "work/",
55-
collapsable: false,
57+
collapsible: false,
5658
children: [
5759
"get-into-work-mode-quickly-when-you-join-a-company",
5860
"employee-performance",
5961
],
6062
},
61-
];
63+
]);
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { sidebar } from "vuepress-theme-hope";
2-
import { highQualityTechnicalArticles } from "./sidebar/high-quality-technical-articles";
3-
import { aboutTheAuthor } from "./sidebar/about-the-author";
4-
import { books } from "./sidebar/books";
5-
import { openSourceProject } from "./sidebar/open-source-project";
62

7-
export const sidebarConfig = sidebar({
3+
import { aboutTheAuthor } from "./about-the-author.js";
4+
import { books } from "./books.js";
5+
import { highQualityTechnicalArticles } from "./high-quality-technical-articles.js";
6+
import { openSourceProject } from "./open-source-project.js";
7+
8+
export default sidebar({
89
// 应该把更精确的路径放置在前边
910
"/open-source-project/": openSourceProject,
1011
"/books/": books,
@@ -198,10 +199,7 @@ export const sidebarConfig = sidebar({
198199
text: "Linux",
199200
collapsible: true,
200201
icon: "linux",
201-
children: [
202-
"linux-intro",
203-
"shell-intro",
204-
],
202+
children: ["linux-intro", "shell-intro"],
205203
},
206204
],
207205
},

docs/.vuepress/sidebar/open-source-project.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export const openSourceProject = [
1+
import { arraySidebar } from "vuepress-theme-hope";
2+
3+
export const openSourceProject = arraySidebar([
24
{
35
text: "技术教程",
46
link: "tutorial",
@@ -34,4 +36,4 @@ export const openSourceProject = [
3436
link: "big-data",
3537
icon: "big-data",
3638
},
37-
];
39+
]);

docs/.vuepress/styles/config.scss

Whitespace-only changes.

0 commit comments

Comments
 (0)