Skip to content

Commit

Permalink
Merge pull request #218 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
Dev c
  • Loading branch information
GuoXiCheng authored Jun 13, 2024
2 parents 690f950 + d732287 commit 30cded1
Show file tree
Hide file tree
Showing 72 changed files with 2,820 additions and 1,980 deletions.
2,946 changes: 1,812 additions & 1,134 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
"code": "ts-node"
},
"devDependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.8",
"@vuepress/plugin-redirect": "^2.0.0-rc.17",
"@vuepress/plugin-register-components": "2.0.0-rc.15",
"@vuepress/plugin-remove-pwa": "2.0.0-rc.17",
"@vuepress/bundler-vite": "2.0.0-rc.13",
"@vuepress/plugin-prismjs": "^2.0.0-rc.34",
"@vuepress/plugin-register-components": "2.0.0-rc.34",
"@vuepress/plugin-remove-pwa": "2.0.0-rc.34",
"mermaid": "^10.6.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"vue": "^3.4.19",
"vuepress": "2.0.0-rc.8",
"vuepress-plugin-md-enhance": "2.0.0-rc.26",
"vuepress-plugin-search-pro": "2.0.0-rc.26",
"vuepress-theme-hope": "2.0.0-rc.26"
"vue": "^3.4.27",
"vuepress": "2.0.0-rc.13",
"vuepress-plugin-md-enhance": "2.0.0-rc.48",
"vuepress-plugin-search-pro": "2.0.0-rc.48",
"vuepress-theme-hope": "2.0.0-rc.48"
}
}
44 changes: 18 additions & 26 deletions src/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1,38 @@
import { viteBundler } from '@vuepress/bundler-vite'
import { viteBundler } from "@vuepress/bundler-vite";
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";
import { registerComponentsPlugin } from '@vuepress/plugin-register-components';
import { removePwaPlugin } from '@vuepress/plugin-remove-pwa';
import { getDirname, path } from '@vuepress/utils'
import { redirectPlugin } from '@vuepress/plugin-redirect';
import { registerComponentsPlugin } from "@vuepress/plugin-register-components";
import { removePwaPlugin } from "@vuepress/plugin-remove-pwa";
import { getDirname, path } from "@vuepress/utils";

const __dirname = getDirname(import.meta.url)
const __dirname = getDirname(import.meta.url);

export default defineUserConfig({
head: [
['script', { src: '/js/snowfall.js', async: true }],
['script', { src: '/js/baidu-analytics.js', async: true }]
// ['script', { src: '/js/snowfall.js', async: true }],
["script", { src: "/js/baidu-analytics.js", async: true }],
],
base: "/",

lang: "zh-CN",
title: "Guo's Page",
description: "",

locales: {
'/': {
lang: 'zh-CN'
},
'/en/': {
lang: 'en-US'
},
},
// locales: {
// "/": {
// lang: "zh-CN",
// },
// "/en/": {
// lang: "en-US",
// },
// },

theme,
plugins: [
registerComponentsPlugin({
componentsDir: path.resolve(__dirname, './components')
}),
removePwaPlugin({
componentsDir: path.resolve(__dirname, "./components"),
}),
redirectPlugin({
config: {
'/SKIP-Docs/1-introduction.html': '/projects/SKIP-Docs/',
'/projects/SKIP-Docs/002-xiaomi.html': '/projects/SKIP-Docs/xiaomi.html'
}
})
removePwaPlugin({}),
],

// Enable it with pwa
Expand Down
28 changes: 0 additions & 28 deletions src/.vuepress/navbar-en.ts

This file was deleted.

14 changes: 4 additions & 10 deletions src/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { navbar } from "vuepress-theme-hope";

export default navbar([
"/projects/",
"/article/",
"/develop/",
"/cloud-native/",
"/design-pattern/",
"/software-engineering/",
"/algorithm/",
"/reading/",
{
text: "站外链接",
Expand All @@ -19,16 +17,12 @@ export default navbar([
},
{
text: "Kotlin",
link: "https://play.kotlinlang.org"
link: "https://play.kotlinlang.org",
},
{
text: "Mermaid",
link: "https://mermaid.live/edit"
link: "https://mermaid.live/edit",
},
{
text: "NodeJS全栈",
link: "https://guoxicheng.top/html/js-full-stack.html"
}
]
}
],
},
]);
6 changes: 0 additions & 6 deletions src/.vuepress/sidebar-en.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { sidebar } from "vuepress-theme-hope";
export default sidebar({
"/knowledge": "structure",
"/reading": "structure",
"/projects": "structure",
"/cloud-native": "structure",
"/design-pattern": "structure",
"/develop": "structure",
"/algorithm": "structure",
"/article": "structure",
"/software-engineering": "structure",
});
54 changes: 28 additions & 26 deletions src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import navbarEn from "./navbar-en.js";
import sidebar from "./sidebar.js";
import { getDirname, path } from "@vuepress/utils";
import sidebarEn from "./sidebar-en.js";

const __dirname = getDirname(import.meta.url);

Expand All @@ -17,7 +15,10 @@ export default hopeTheme({
editLink: false,
pageInfo: ["Date", "Word", "Tag"],

iconAssets: ["fontawesome-with-brands", "//at.alicdn.com/t/c/font_4381716_dtn01hmwmvf.css"],
iconAssets: [
"fontawesome-with-brands",
"//at.alicdn.com/t/c/font_4381716_dtn01hmwmvf.css",
],

logo: "/logo.png",

Expand All @@ -27,28 +28,29 @@ export default hopeTheme({

docsBranch: "master",

locales: {
'/': {
navbar: navbar,
sidebar: sidebar
},
'/en/': {
navbar: navbarEn,
sidebar: sidebarEn
},
},
sidebar,
navbar,
// locales: {
// '/': {
// navbar: navbar,
// sidebar: sidebar
// },
// '/en/': {
// navbar: navbarEn,
// sidebar: sidebarEn
// },
// },

sidebarSorter: "order",
// sidebar: "heading",

footer: "Made With <a href='https://github.com/vuepress-theme-hope/vuepress-theme-hope' target='_blank'>vuepress-theme-hope</a> Theme <br/> Copyright © 2023-present GuoXiCheng",
footer:
"Made With <a href='https://github.com/vuepress-theme-hope/vuepress-theme-hope' target='_blank'>vuepress-theme-hope</a> Theme <br/> Copyright © 2023-present GuoXiCheng",

displayFooter: true,

encrypt: {
config: {

},
config: {},
},

// page meta
Expand All @@ -58,15 +60,15 @@ export default hopeTheme({

plugins: {
prismjs: {
light: "one-dark"
light: "one-dark",
},

comment: {
provider: 'Giscus',
repo: 'GuoXiCheng/guoxicheng.github.io',
repoId: 'MDEwOlJlcG9zaXRvcnkyNTQ1Nzk0ODc=',
category: 'Announcements',
categoryId: 'DIC_kwDODyyTH84Cdco8',
provider: "Giscus",
repo: "GuoXiCheng/guoxicheng.github.io",
repoId: "MDEwOlJlcG9zaXRvcnkyNTQ1Nzk0ODc=",
category: "Announcements",
categoryId: "DIC_kwDODyyTH84Cdco8",
strict: true,
lazyLoading: true,
reactionsEnabled: true,
Expand Down Expand Up @@ -118,7 +120,7 @@ export default hopeTheme({
sup: true,
tabs: true,
vPre: true,
vuePlayground: true
vuePlayground: true,
},

pwa: {
Expand Down Expand Up @@ -174,8 +176,8 @@ export default hopeTheme({
git: {
contributors: false,
updatedTime: true,
createdTime: true
createdTime: true,
},
searchPro: true
searchPro: true,
},
});
Loading

0 comments on commit 30cded1

Please sign in to comment.