1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Merge pull request #1993 from Mister-Hope/update

feat: update deps and switch to pnpm
This commit is contained in:
Guide 2023-04-28 16:27:35 +08:00 committed by GitHub
commit 566c75d5a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 6303 additions and 298 deletions

13
.gitignore vendored
View File

@ -1,15 +1,14 @@
/node_modules
/package-lock.json
node_modules/
# *.drawio
*.drawio.bkp
.DS_Store
# VS Code Config file
.vscode/
# Vuepress Cache
.cache/
# Vuepress Temp
.temp/
# Vuepress Output
# VuePress Cache
**/.vuepress/.cache/
# VuePress Temp
**/.vuepress/.temp/
# VuePress Output
dist/
# Build files
packages/*/lib/

View File

@ -1,14 +1,15 @@
import { defineUserConfig } from "vuepress";
import { themeConfig } from "./themeConfig";
import { searchPlugin } from "@vuepress/plugin-search";
import { searchProPlugin } from "vuepress-plugin-search-pro";
import theme from "./theme.js";
export default defineUserConfig({
dest: "./dist",
theme: themeConfig,
shouldPrefetch: false,
title: "JavaGuide(Java面试+学习指南)",
description:
"「Java学习指北+Java面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,复习 Java 知识点,首选 JavaGuide ",
head: [
// meta
["meta", { name: "robots", content: "all" }],
@ -43,28 +44,18 @@ export default defineUserConfig({
s.parentNode.insertBefore(hm, s);
})();`,
],
["link", { rel: "stylesheet", href: "/iconfont/iconfont.css" }],
["link", { rel: "icon", href: "/favicon.ico" }],
],
locales: {
"/": {
lang: "zh-CN",
},
},
plugins: [
searchPlugin({
// https://v2.vuepress.vuejs.org/zh/reference/plugin/search.html
// 排除首页
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
hotKeys: ["s", "/"],
// 用于在页面的搜索索引中添加额外字段
getExtraFields: () => [],
locales: {
"/": {
placeholder: "搜索",
},
},
}),
],
theme,
plugins: [searchProPlugin({ indexContent: true })],
shouldPrefetch: false,
});

View File

@ -1,11 +1,15 @@
import { navbar } from "vuepress-theme-hope";
export const navbarConfig = navbar([
export default navbar([
{ text: "面试指南", icon: "java", link: "/home.md" },
{ text: "知识星球", icon: "code", link: "/about-the-author/zhishixingqiu-two-years.md" },
{ text: "开源项目", icon: "github", link: "/open-source-project/" },
{ text: "技术书籍", icon: "book", link: "/books/" },
{ text: "程序人生", icon: "article", link: "/high-quality-technical-articles/" },
{
text: "程序人生",
icon: "article",
link: "/high-quality-technical-articles/",
},
{
text: "网站相关",
icon: "about",

View File

@ -1,223 +0,0 @@
@font-face {
font-family: "iconfont"; /* Project id 2922463 */
src: url('iconfont.woff2?t=1660530571134') format('woff2'),
url('iconfont.woff?t=1660530571134') format('woff'),
url('iconfont.ttf?t=1660530571134') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-history:before {
content: "\e752";
}
.icon-experience:before {
content: "\e72b";
}
.icon-code:before {
content: "\e7fc";
}
.icon-interview:before {
content: "\e65d";
}
.icon-about:before {
content: "\e6e5";
}
.icon-search:before {
content: "\e7de";
}
.icon-featured:before {
content: "\e633";
}
.icon-codelibrary-fill:before {
content: "\e84b";
}
.icon-tool:before {
content: "\e70c";
}
.icon-highavailable:before {
content: "\ea23";
}
.icon-big-data:before {
content: "\e632";
}
.icon-work:before {
content: "\e8d7";
}
.icon-project:before {
content: "\e702";
}
.icon-article:before {
content: "\e672";
}
.icon-a-MachineLearning:before {
content: "\e617";
}
.icon-github:before {
content: "\e673";
}
.icon-rss:before {
content: "\e768";
}
.icon-mianshi:before {
content: "\e614";
}
.icon-et-performance:before {
content: "\e623";
}
.icon-virtual_machine:before {
content: "\e73f";
}
.icon-basic:before {
content: "\e67b";
}
.icon-container:before {
content: "\e641";
}
.icon-MQ:before {
content: "\e684";
}
.icon-redis:before {
content: "\e619";
}
.icon-mysql:before {
content: "\e613";
}
.icon-recommend:before {
content: "\e639";
}
.icon-chat:before {
content: "\e66a";
}
.icon-tips:before {
content: "\e62a";
}
.icon-chajian1:before {
content: "\e69d";
}
.icon-star:before {
content: "\e61d";
}
.icon-docker1:before {
content: "\e659";
}
.icon-zuozhe:before {
content: "\e688";
}
.icon-pdf:before {
content: "\e740";
}
.icon-suanfaku:before {
content: "\e63a";
}
.icon-jichushuju:before {
content: "\e60c";
}
.icon-people-network-full:before {
content: "\e865";
}
.icon-git:before {
content: "\e708";
}
.icon-luxianchaxun:before {
content: "\e622";
}
.icon-computer:before {
content: "\e601";
}
.icon-framework:before {
content: "\e69e";
}
.icon-Tools:before {
content: "\ed5f";
}
.icon-xitongsheji:before {
content: "\e63e";
}
.icon-database:before {
content: "\e8e4";
}
.icon-security-fill:before {
content: "\e78b";
}
.icon-docker:before {
content: "\e616";
}
.icon-java:before {
content: "\e6e0";
}
.icon-book:before {
content: "\e7c7";
}
.icon-network:before {
content: "\e67a";
}
.icon-caozuoxitong:before {
content: "\e686";
}
.icon-gaojixiaozuzhibeifen:before {
content: "\e756";
}
.icon-distributed-network:before {
content: "\e8d5";
}
.icon-intellijidea:before {
content: "\ebd1";
}

View File

@ -1,8 +1,10 @@
export const aboutTheAuthor = [
import { arraySidebar } from "vuepress-theme-hope";
export const aboutTheAuthor = arraySidebar([
{
text: "个人经历",
icon: "zuozhe",
collapsable: false,
collapsible: false,
children: [
"internet-addiction-teenager",
"my-college-life",
@ -14,7 +16,7 @@ export const aboutTheAuthor = [
{
text: "杂谈",
icon: "chat",
collapsable: false,
collapsible: false,
children: [
"writing-technology-blog-six-years",
"my-article-was-stolen-and-made-into-video-and-it-became-popular",
@ -22,4 +24,4 @@ export const aboutTheAuthor = [
"zhishixingqiu-two-years",
],
},
];
]);

View File

@ -1,4 +1,6 @@
export const books = [
import { arraySidebar } from "vuepress-theme-hope";
export const books = arraySidebar([
{
text: "计算机基础",
link: "cs-basics",
@ -30,4 +32,4 @@ export const books = [
link: "distributed-system",
icon: "distributed-network",
},
];
]);

View File

@ -1,9 +1,11 @@
export const highQualityTechnicalArticles = [
import { arraySidebar } from "vuepress-theme-hope";
export const highQualityTechnicalArticles = arraySidebar([
{
text: "练级攻略",
icon: "et-performance",
prefix: "advanced-programmer/",
collapsable: false,
collapsible: false,
children: [
"the-growth-strategy-of-the-technological-giant",
"seven-tips-for-becoming-an-advanced-programmer",
@ -14,7 +16,7 @@ export const highQualityTechnicalArticles = [
text: "个人经历",
icon: "experience",
prefix: "personal-experience/",
collapsable: false,
collapsible: false,
children: [
"four-year-work-in-tencent-summary",
"two-years-of-back-end-develop--experience-in-didi&toutiao",
@ -26,7 +28,7 @@ export const highQualityTechnicalArticles = [
text: "程序员",
icon: "code",
prefix: "programmer/",
collapsable: false,
collapsible: false,
children: [
"how-do-programmers-publish-a-technical-book",
"efficient-book-publishing-and-practice-guide",
@ -36,7 +38,7 @@ export const highQualityTechnicalArticles = [
text: "面试",
icon: "interview",
prefix: "interview/",
collapsable: false,
collapsible: false,
children: [
"the-experience-of-get-offer-from-over-20-big-companies",
"the-experience-and-thinking-of-an-interview-experienced-by-an-older-programmer",
@ -52,10 +54,10 @@ export const highQualityTechnicalArticles = [
text: "工作",
icon: "work",
prefix: "work/",
collapsable: false,
collapsible: false,
children: [
"get-into-work-mode-quickly-when-you-join-a-company",
"employee-performance",
],
},
];
]);

View File

@ -1,10 +1,11 @@
import { sidebar } from "vuepress-theme-hope";
import { highQualityTechnicalArticles } from "./sidebar/high-quality-technical-articles";
import { aboutTheAuthor } from "./sidebar/about-the-author";
import { books } from "./sidebar/books";
import { openSourceProject } from "./sidebar/open-source-project";
export const sidebarConfig = sidebar({
import { aboutTheAuthor } from "./about-the-author.js";
import { books } from "./books.js";
import { highQualityTechnicalArticles } from "./high-quality-technical-articles.js";
import { openSourceProject } from "./open-source-project.js";
export default sidebar({
// 应该把更精确的路径放置在前边
"/open-source-project/": openSourceProject,
"/books/": books,
@ -198,10 +199,7 @@ export const sidebarConfig = sidebar({
text: "Linux",
collapsible: true,
icon: "linux",
children: [
"linux-intro",
"shell-intro",
],
children: ["linux-intro", "shell-intro"],
},
],
},

View File

@ -1,4 +1,6 @@
export const openSourceProject = [
import { arraySidebar } from "vuepress-theme-hope";
export const openSourceProject = arraySidebar([
{
text: "技术教程",
link: "tutorial",
@ -34,4 +36,4 @@ export const openSourceProject = [
link: "big-data",
icon: "big-data",
},
];
]);

View File

@ -1,4 +1,4 @@
$theme-color: #2980B9;
$theme-color: #2980b9;
$sidebar-width: 20rem;
$sidebar-mobile-width: 16rem;
$content-width: 60em;

View File

@ -1,19 +1,28 @@
import { hopeTheme } from "vuepress-theme-hope";
import { navbarConfig } from "./navbar";
import { sidebarConfig } from "./sidebar";
export const themeConfig = hopeTheme({
import navbar from "./navbar.js";
import sidebar from "./sidebar/index.js";
export default hopeTheme({
logo: "/logo.png",
hostname: "https://javaguide.cn/",
iconAssets: "//at.alicdn.com/t/c/font_2922463_9aayheyb3v7.css",
author: {
name: "Guide",
url: "https://javaguide.cn/article/",
},
repo: "https://github.com/Snailclimb/JavaGuide",
docsDir: "docs",
iconAssets: "//at.alicdn.com/t/c/font_2922463_9aayheyb3v7.css",
navbar: navbarConfig,
sidebar: sidebarConfig,
navbar,
sidebar,
footer:
'<a href="https://beian.miit.gov.cn/" target="_blank">鄂ICP备2020015769号-1</a>',
displayFooter: true,
pageInfo: [
"Author",
"Category",
@ -23,6 +32,7 @@ export const themeConfig = hopeTheme({
"Word",
"ReadingTime",
],
blog: {
intro: "/about-the-author/",
sidebarDisplay: "mobile",
@ -32,9 +42,7 @@ export const themeConfig = hopeTheme({
Gitee: "https://gitee.com/SnailClimb",
},
},
footer:
'<a href="https://beian.miit.gov.cn/" target="_blank">鄂ICP备2020015769号-1</a>',
displayFooter: true,
plugins: {
blog: true,
copyright: true,
@ -44,7 +52,9 @@ export const themeConfig = hopeTheme({
tasklist: true,
},
feed: {
atom: true,
json: true,
rss: true,
},
},
});

View File

@ -5,19 +5,17 @@
"description": "javaguide",
"license": "MIT",
"author": "Guide",
"packageManager": "pnpm@8.3.1",
"scripts": {
"vite-build": "vuepress-vite build docs",
"vite-serve": "vuepress-vite dev docs",
"vite-clean-serve": "vuepress-vite dev docs --clean-cache",
"webpack-build": "vuepress-webpack build docs",
"webpack-clean-serve": "vuepress-webpack dev docs --clean-cache",
"webpack-serve": "vuepress-webpack dev docs"
"docs:build": "vuepress build docs",
"docs:dev": "vuepress dev docs",
"docs:clean-dev": "vuepress dev docs --clean-cache"
},
"dependencies": {
"vuepress": "^2.0.0-beta.53",
"vuepress-theme-hope": "^2.0.0-beta.122",
"vuepress-vite": "2.0.0-beta.53",
"vuepress-webpack": "2.0.0-beta.53",
"@vuepress/plugin-search": "^2.0.0-beta.53"
"@vuepress/client": "2.0.0-beta.61",
"vue": "3.2.47",
"vuepress": "2.0.0-beta.61",
"vuepress-plugin-search-pro": "2.0.0-beta.206",
"vuepress-theme-hope": "2.0.0-beta.206"
}
}

6220
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff