Skip to content

Commit

Permalink
Merge pull request #172 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
GuoXiCheng authored Feb 6, 2024
2 parents f86f557 + 7fe5419 commit 03fcd03
Show file tree
Hide file tree
Showing 7 changed files with 1,287 additions and 1,752 deletions.
2,949 changes: 1,210 additions & 1,739 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
"code": "ts-node"
},
"devDependencies": {
"@vuepress/client": "2.0.0-rc.0",
"@vuepress/plugin-register-components": "^2.0.0-rc.0",
"@vuepress/bundler-vite": "^2.0.0-rc.6",
"@vuepress/plugin-pwa": "^2.0.0-rc.11",
"@vuepress/plugin-pwa-popup": "^2.0.0-rc.11",
"@vuepress/plugin-register-components": "2.0.0-rc.11",
"mermaid": "^10.6.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"vue": "^3.3.13",
"vuepress": "2.0.0-rc.0",
"vuepress-plugin-md-enhance": "2.0.0-rc.5",
"vuepress-theme-hope": "2.0.0-rc.5"
"vue": "^3.4.15",
"vuepress": "2.0.0-rc.6",
"vuepress-plugin-md-enhance": "2.0.0-rc.22",
"vuepress-theme-hope": "2.0.0-rc.22"
}
}
12 changes: 12 additions & 0 deletions src/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { viteBundler } from '@vuepress/bundler-vite'
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";
import { registerComponentsPlugin } from '@vuepress/plugin-register-components';
import { getDirname, path } from '@vuepress/utils'
import { pwaPlugin } from '@vuepress/plugin-pwa'
import { pwaPopupPlugin } from '@vuepress/plugin-pwa-popup'
const __dirname = getDirname(import.meta.url)

export default defineUserConfig({
head: [
['script', { src: '/js/snowfall.js', async: true }],
['link', { rel: 'manifest', href: '/manifest.webmanifest' }]
],
base: "/",

Expand All @@ -27,8 +32,15 @@ export default defineUserConfig({
registerComponentsPlugin({
componentsDir: path.resolve(__dirname, './components')
}),
pwaPlugin(),
pwaPopupPlugin()
],

// Enable it with pwa
shouldPrefetch: false,

bundler: viteBundler({
viteOptions: {},
vuePluginOptions: {},
}),
});
2 changes: 1 addition & 1 deletion src/.vuepress/navbar-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { navbar } from "vuepress-theme-hope";

export default navbar([
"/en/projects/",
"/en/algorithm",
"/en/algorithm/",
{
text: "Online Coding",
icon: "code",
Expand Down
8 changes: 4 additions & 4 deletions src/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ export default navbar([
"/projects/",
"/reading/",
"/cloud-native/",
"/design-pattern",
"/develop",
"/algorithm",
"/article",
"/design-pattern/",
"/develop/",
"/algorithm/",
"/article/",
{
text: "在线编程",
icon: "code",
Expand Down
50 changes: 50 additions & 0 deletions src/.vuepress/public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"favicon": "/favicon.ico",
"cacheHTML": true,
"cachePic": true,
"appendBase": true,
"themeColor": "#000000",
"update": "available",
"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": "Demo",
"short_name": "Demo",
"url": "/demo/",
"icons": [
{
"src": "/assets/icon/guide-maskable.png",
"sizes": "192x192",
"purpose": "maskable",
"type": "image/png"
}
]
}
]
}
}

4 changes: 2 additions & 2 deletions src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default hopeTheme({
vPre: true,
vuePlayground: true
},

/*
pwa: {
favicon: "/favicon.ico",
cacheHTML: true,
Expand Down Expand Up @@ -164,7 +164,7 @@ export default hopeTheme({
],
},
},

*/
git: {
contributors: false,
updatedTime: true,
Expand Down

0 comments on commit 03fcd03

Please sign in to comment.