mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
feat: update deps and use pnpm
This commit is contained in:
parent
c1fc5ac09c
commit
7703240ba3
13
.gitignore
vendored
13
.gitignore
vendored
@ -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/
|
||||
|
@ -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" }],
|
||||
@ -46,25 +47,16 @@ export default defineUserConfig({
|
||||
["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,
|
||||
});
|
||||
|
@ -1,10 +1,14 @@
|
||||
import { navbar } from "vuepress-theme-hope";
|
||||
|
||||
export const navbarConfig = navbar([
|
||||
export default navbar([
|
||||
{ text: "面试指南", icon: "java", link: "/home.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",
|
||||
|
@ -1,8 +1,8 @@
|
||||
@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');
|
||||
src: url("iconfont.woff2?t=1660530571134") format("woff2"),
|
||||
url("iconfont.woff?t=1660530571134") format("woff"),
|
||||
url("iconfont.ttf?t=1660530571134") format("truetype");
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -220,4 +220,3 @@
|
||||
.icon-intellijidea:before {
|
||||
content: "\ebd1";
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
],
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
@ -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",
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
@ -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",
|
||||
],
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
@ -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"],
|
||||
},
|
||||
],
|
||||
},
|
@ -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",
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
@ -1,4 +1,4 @@
|
||||
$theme-color: #2980B9;
|
||||
$theme-color: #2980b9;
|
||||
$sidebar-width: 20rem;
|
||||
$sidebar-mobile-width: 16rem;
|
||||
$content-width: 60em;
|
||||
|
@ -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,
|
20
package.json
20
package.json
@ -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:serve": "vuepress dev docs",
|
||||
"docs:clean-serve": "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
6220
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user