forked from Snailclimb/JavaGuide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
426 lines (416 loc) · 15.1 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
const { config } = require("vuepress-theme-hope");
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = config({
port: "8080",
title: "JavaGuide",
description: "Java学习&&面试指南",
//指定 vuepress build 的输出目录
dest: "./dist",
// 是否开启默认预加载js
shouldPrefetch: (file, type) => false,
// webpack 配置 https://vuepress.vuejs.org/zh/config/#chainwebpack
// chainWebpack: config => {
// if (process.env.NODE_ENV === 'production') {
// const dateTime = new Date().getTime();
// // 清除js版本号
// config.output.filename('assets/js/jg-[name].js?v=' + dateTime).end();
// config.output.chunkFilename('assets/js/jg-[name].js?v=' + dateTime).end();
// // 清除css版本号
// config.plugin('mini-css-extract-plugin').use(require('mini-css-extract-plugin'), [{
// filename: 'assets/css/[name].css?v=' + dateTime,
// chunkFilename: 'assets/css/[name].css?v=' + dateTime
// }]).end();
// }
// },
configureWebpack: {
//vuepress 编译压缩
plugins: [new CompressionPlugin({
filename: "[path].gz", //编译后的文件名
algorithm: "gzip",
test: /\.js$|\.css$|\.html$/,//需要编译的文件
threshold: 10240,//需要编译的文件大小
minRatio: 0.8,//压缩比
deleteOriginalAssets: false,//编译时是否删除源文件
})],
},
head: [
// 百度站点验证
["meta", { name: "baidu-site-verification", content: "code-IZvTs9l2OK" }],
[
"script",
{ src: "https://cdn.jsdelivr.net/npm/react/umd/react.production.min.js" },
],
[
"script",
{
src: "https://cdn.jsdelivr.net/npm/react-dom/umd/react-dom.production.min.js",
},
],
["script", { src: "https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js" }],
[
"script",
{ src: "https://cdn.jsdelivr.net/npm/@babel/standalone/babel.min.js" },
],
// 添加百度统计
[
"script", {},
`var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5dd2e8c97962d57b7b8fea1737c01743";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();`
]
],
locales: {
"/": {
lang: "zh-CN"
}
},
themeConfig: {
logo: "/logo.png", hostname: "https://javaguide.cn/", author: "Guide哥", repo: "https://github.com/Snailclimb/JavaGuide",
editLinks: true, docsDir: 'docs', seo: true,
nav: [
{ text: "Java面试指南", icon: "java", link: "/home", },
{ text: "官方知识星球", icon: "recommend", link: "https://sourl.cn/JkDJJP", },
{
text: "开发工具", icon: "Tools", link: "/tools/",
items: [
{ text: "Java", icon: "java", link: "/tools/java/jadx/" },
{ text: "Database", icon: "database", link: "/tools/database/chiner/" },
{ text: "Git", icon: "git", link: "/tools/git/git-intro/" },
{ text: "Docker", icon: "docker1", link: "/tools/docker/docker-intro/" },
{ text: "IntelliJ IDEA", icon: "intellijidea", link: "/idea-tutorial/" },
]
},
{ text: "关于作者", icon: "zuozhe", link: "/about-the-author/" },
],
sidebar: {
// 应该把更精确的路径放置在前边
"/javaguide/": [
"intro", "contribution-guideline", "faq", "todo"
],
"/about-the-author/": [
{
title: "个人经历", icon: "zuozhe", collapsable: false,
children: ["internet-addiction-teenager", "javaguide-100k-star", "feelings-after-one-month-of-induction-training", "feelings-of-half-a-year-from-graduation-to-entry",]
},
{
title: "杂谈", icon: "chat", collapsable: false,
children: ["my-article-was-stolen-and-made-into-video-and-it-became-popular", "dog-that-copies-other-people-essay",]
},
],
'/tools/': [
{
title: "Java", icon: "java", prefix: "java/", collapsable: false,
children: ["jadx"]
},
{
title: "Database", icon: "database", prefix: "database/", collapsable: false,
children: ["chiner", "dbeaver", "screw", "datagrip"]
},
{
title: "Git", icon: "git", prefix: "git/", collapsable: false,
children: ["git-intro", "github-tips"]
},
{
title: "Docker", icon: "docker1", prefix: "docker/", collapsable: false,
children: ["docker-intro", "docker-in-action"]
},
],
'/high-quality-technical-articles/': [
{
title: "练级攻略", icon: "lujing", prefix: "advanced-programmer/", collapsable: false,
children: ["seven-tips-for-becoming-an-advanced-programmer"]
},
{
title: "个人经历", icon: "zuozhe", prefix: "personal-experience/", collapsable: false,
children: ["two-years-of-back-end-develop--experience-in-didi&toutiao", "8-years-programmer-work-summary"]
},
{
title: "面试", icon: "mianshixinxi-02", prefix: "interview/", collapsable: false,
children: ["the-experience-and-thinking-of-an-interview-experienced-by-an-older-programmer", "technical-preliminary-preparation", "screen-candidates-for-packaging"],
},
{
title: "工作", icon: "work0", prefix: "work/", collapsable: false,
children: ["get-into-work-mode-quickly-when-you-join-a-company"]
}
],
'/idea-tutorial/':
[
{
title: "IDEA小技巧", icon: "tips", prefix: "idea-tips/", collapsable: false,
children: [
"idea-refractor-intro",
"idea-plug-in-development-intro",
"idea-source-code-reading-skills",
]
},
{
title: "IDEA插件推荐", icon: "chajian1", collapsable: false, prefix: "idea-plugins/",
children: [
"shortcut-key", "idea-themes", "improve-code", "interface-beautification",
"camel-case", "code-glance", "code-statistic",
"git-commit-template", "gson-format", "idea-features-trainer", "jclasslib",
"maven-helper", "rest-devlop", "save-actions", "sequence-diagram", "translation",
"others"
]
},
],
// 必须放在最后面
'/': [{
title: "Java", icon: "java", prefix: "java/",
children: [
{
title: "基础", prefix: "basis/",
children: [
"java-basic-questions-01", "java-basic-questions-02", "java-basic-questions-03",
{
title: "重要知识点",
children: [
"why-there-only-value-passing-in-java", "reflection", "proxy", "io",
"bigdecimal", "generics"
],
},],
},
{
title: "容器", prefix: "collection/",
children: [
"java-collection-questions-01", "java-collection-questions-02", "java集合使用注意事项",
{
title: "源码分析",
children: ["arraylist-source-code", "hashmap-source-code", "concurrent-hash-map-source-code"],
},],
},
{
title: "并发编程", prefix: "concurrent/",
children: [
"java-concurrent-questions-01", "java-concurrent-questions-02",
{
title: "重要知识点",
children: ["java-thread-pool-summary", "java-thread-pool-best-practices", "java-concurrent-collections", "aqs", "reentrantlock",
"atomic-classes", "threadlocal", "completablefuture-intro"],
},
],
},
{
title: "JVM", prefix: "jvm/",
children: ["memory-area", "jvm-garbage-collection", "class-file-structure", "class-loading-process", "classloader", "jvm-parameters-intro", "jvm-intro", "jdk-monitoring-and-troubleshooting-tools"],
},
{
title: "新特性", prefix: "new-features/",
children: ["java8-common-new-features", "java8-tutorial-translate", "java新特性总结"],
},
{
title: "小技巧", prefix: "tips/",
children: ["locate-performance-problems/手把手教你定位常见Java性能问题", "jad"],
},
],
},
{
title: "计算机基础", icon: "computer", prefix: "cs-basics/",
children: [
{
title: "计算机网络", prefix: "network/", icon: "network",
children: [
"计算机网络常见面试题", "谢希仁老师的《计算机网络》内容总结", "HTTPS中的TLS"
],
},
{
title: "操作系统", prefix: "operating-system/", icon: "caozuoxitong",
children: [
"操作系统常见面试题&知识点总结", "linux-intro", "shell-intro"
],
},
{
title: "数据结构", prefix: "data-structure/", icon: "people-network-full",
children: [
"线性数据结构", "图", "堆", "树", "红黑树", "bloom-filter"
],
},
{
title: "算法", prefix: "algorithms/", icon: "suanfaku",
children: [
"几道常见的字符串算法题", "几道常见的链表算法题", "剑指offer部分编程题"
],
},
],
},
{
title: "数据库", icon: "database", prefix: "database/",
children: [
"数据库基础知识",
"字符集",
{
title: "MySQL", prefix: "mysql/",
children: [
"mysql知识点&面试题总结",
"a-thousand-lines-of-mysql-study-notes",
"mysql-high-performance-optimization-specification-recommendations",
"mysql-index", "mysql-logs", "transaction-isolation-level",
"innodb-implementation-of-mvcc", "how-sql-executed-in-mysql",
"some-thoughts-on-database-storage-time"
],
},
{
title: "Redis", prefix: "redis/",
children: ["redis-questions-01", "3-commonly-used-cache-read-and-write-strategies"],
},
],
},
{
title: "系统设计", icon: "xitongsheji", prefix: "system-design/",
children: [
{
title: "基础", prefix: "basis/", icon: "jibendebasic",
children: [
"RESTfulAPI",
"naming",
],
},
{
title: "常用框架", prefix: "framework/", icon: "framework",
children: [{
title: "Spring", prefix: "spring/",
children: [
"spring-knowledge-and-questions-summary", "spring-common-annotations", "spring-transaction", "spring-design-patterns-summary", "spring-boot-auto-assembly-principles"
]
},
"mybatis/mybatis-interview", "netty",
{
title: "SpringCloud", prefix: "springcloud/",
children: ["springcloud-intro"]
},
],
},
{
title: "安全", prefix: "security/", icon: "security-fill",
children: ["basis-of-authority-certification", "advantages&disadvantages-of-jwt", "sso-intro", "sentive-words-filter", "data-desensitization"]
},
"定时任务"
],
},
{
title: "分布式", icon: "distributed-network", prefix: "distributed-system/",
children: [
{
title: "理论&算法&协议", prefix: "theorem&algorithm&protocol/",
children: ["cap&base-theorem", "paxos-algorithm", "raft-algorithm"],
},
"api-gateway", "distributed-id",
{
title: "rpc", prefix: "rpc/",
children: ["dubbo", "why-use-rpc"]
},
"distributed-transaction",
{
title: "分布式协调", prefix: "distributed-process-coordination/",
children: ["zookeeper/zookeeper-intro", "zookeeper/zookeeper-plus", "zookeeper/zookeeper-in-action"]
},
],
}, {
title: "高性能", icon: "gaojixiaozuzhibeifen", prefix: "high-performance/",
children: [
"读写分离&分库分表", "负载均衡",
{
title: "消息队列", prefix: "message-queue/",
children: ["message-queue", "kafka知识点&面试题总结", "rocketmq-intro", "rocketmq-questions", "rabbitmq-intro"],
},
],
}, {
title: "高可用", icon: "CalendarAvailability-1", prefix: "high-availability/",
children: [
"高可用系统设计", "limit-request", "降级&熔断", "超时和重试机制", "集群", "灾备设计和异地多活", "性能测试"
],
}],
},
blog: {
intro: "/about-the-author/",
sidebarDisplay: "mobile",
links: {
Zhihu: "https://www.zhihu.com/people/javaguide",
Github: "https://github.com/Snailclimb",
Gitee: "https://gitee.com/SnailClimb",
},
},
footer: {
display: true,
content: '<a href="https://beian.miit.gov.cn/" target="_blank">鄂ICP备2020015769号-1</a>',
},
copyright: {
status: "global",
},
git: {
timezone: "Asia/Shanghai",
},
mdEnhance: {
enableAll: false,
presentation: {
plugins: [
"highlight", "math", "search", "notes", "zoom", "anything", "audio", "chalkboard",
],
},
},
pwa: {
favicon: "/favicon.ico",
cachePic: false,
cacheHTML: false,
apple: {
icon: "/assets/icon/apple-icon-152.png",
statusBarColor: "black",
},
msTile: {
image: "/assets/icon/ms-icon-144.png",
color: "#ffffff",
},
manifest: {
icons: [
{
src: "/assets/icon/chrome-mask-512.png",
sizes: "512x512",
purpose: "maskable",
type: "image/png",
},
{
src: "/assets/icon/chrome-mask-192.png",
sizes: "192x192",
purpose: "maskable",
type: "image/png",
},
{
src: "/assets/icon/chrome-512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "/assets/icon/chrome-192.png",
sizes: "192x192",
type: "image/png",
},
],
shortcuts: [
{
name: "Guide",
short_name: "Guide",
url: "/guide/",
icons: [
{
src: "/assets/icon/guide-maskable.png",
sizes: "192x192",
purpose: "maskable",
type: "image/png",
},
{
src: "/assets/icon/guide-monochrome.png",
sizes: "192x192",
purpose: "monochrome",
type: "image/png",
},
],
},
],
},
},
},
});