diff --git a/.gitignore b/.gitignore index 32737489..4ed53cdd 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ public/newsCategories *.sln *.sw? pasteServer/paste/* +.vite-ssg-temp \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c89719b2..37cf2aa8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,12 +26,12 @@ "vite": "^5.1.4", "vite-plugin-prismjs": "^0.0.11", "vue": "^3.5.1", - "vue-clipboard3": "^2.0.0", - "vue-router": "4" + "vue-clipboard3": "^2.0.0" }, "devDependencies": { "@stylistic/eslint-plugin-js": "^2.8.0", "@stylistic/eslint-plugin-plus": "^2.8.0", + "@unhead/vue": "^1.11.6", "autoprefixer": "^10.4.18", "eslint": "^9.10.0", "eslint-config-prettier": "^9.1.0", @@ -44,7 +44,9 @@ "sass-loader": "^14.1.1", "svgo": "^3.3.2", "tailwindcss": "^3.4.1", - "vue-eslint-parser": "^9.4.3" + "vite-ssg": "^0.23.8", + "vue-eslint-parser": "^9.4.3", + "vue-router": "^4.4.5" } }, "node_modules/@alloc/quick-lru": { @@ -738,9 +740,8 @@ "version": "0.3.6", "resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "devOptional": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -1602,6 +1603,67 @@ "dev": true, "license": "ISC" }, + "node_modules/@unhead/dom": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.11.6.tgz", + "integrity": "sha512-FYU8Cu+XWcpbO4OvXdB6x7m6GTPcl6CW7igI8rNu6Kc0Ilxb+atxIvyFXdTGAyB7h/F0w3ex06ZVWJ65f3EW8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@unhead/schema": "1.11.6", + "@unhead/shared": "1.11.6" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/schema": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.11.6.tgz", + "integrity": "sha512-Ava5+kQERaZ2fi66phgR9KZQr9SsheN1YhhKM8fCP2A4Jb5lHUssVQ19P0+89V6RX9iUg/Q27WdEbznm75LzhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookable": "^5.5.3", + "zhead": "^2.2.4" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/shared": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@unhead/shared/-/shared-1.11.6.tgz", + "integrity": "sha512-aGrtzRCcFlVh9iru73fBS8FA1vpQskS190t5cCRRMpisOEunVv3ueqXN1F8CseQd0W4wyEr/ycDvdfKt+RPv5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@unhead/schema": "1.11.6" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/vue": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@unhead/vue/-/vue-1.11.6.tgz", + "integrity": "sha512-CMuDJGTi4n4wKdOp6/JmB9roGshjTdoFKF34PEkXu4+g97BiVFiZ9LvgY44+UlWCUzQHcqEPRQIzm9iKEqcfKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@unhead/schema": "1.11.6", + "@unhead/shared": "1.11.6", + "defu": "^6.1.4", + "hookable": "^5.5.3", + "unhead": "1.11.6" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "vue": ">=2.7 || >=3" + } + }, "node_modules/@vant/icons": { "version": "1.8.0", "resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz", @@ -1683,9 +1745,9 @@ } }, "node_modules/@vue/devtools-api": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.3.tgz", - "integrity": "sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==", "license": "MIT" }, "node_modules/@vue/reactivity": { @@ -1909,6 +1971,19 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2248,9 +2323,8 @@ "version": "1.1.2", "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "license": "MIT", - "optional": true, - "peer": true + "devOptional": true, + "license": "MIT" }, "node_modules/c12": { "version": "1.11.2", @@ -2314,6 +2388,17 @@ "node": ">=6" } }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, "node_modules/camelcase-css": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/camelcase-css/-/camelcase-css-2.0.1.tgz", @@ -2494,6 +2579,29 @@ "node": ">= 0.4" } }, + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clean-css/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/clipboard": { "version": "2.0.11", "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", @@ -2505,6 +2613,120 @@ "tiny-emitter": "^2.0.0" } }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/codemirror": { "version": "5.65.16", "resolved": "https://registry.npmmirror.com/codemirror/-/codemirror-5.65.16.tgz", @@ -2737,6 +2959,19 @@ "dev": true, "license": "CC0-1.0" }, + "node_modules/cssstyle": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", + "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "rrweb-cssom": "^0.7.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", @@ -3495,6 +3730,20 @@ "node": ">=0.10.0" } }, + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", @@ -3518,6 +3767,13 @@ } } }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true, + "license": "MIT" + }, "node_modules/decode-named-character-reference": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", @@ -3717,6 +3973,17 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", @@ -4682,6 +4949,16 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-stream": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", @@ -4958,6 +5235,89 @@ "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", "license": "MIT" }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/html-minifier-terser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", + "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "~5.3.2", + "commander": "^10.0.0", + "entities": "^4.4.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.15.1" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + } + }, + "node_modules/html-minifier-terser/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/html5parser": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html5parser/-/html5parser-2.0.2.tgz", + "integrity": "sha512-L0y+IdTVxHsovmye8MBtFgBvWZnq1C9WnI/SmJszxoQjmUH1psX2uzDk21O5k5et6udxdGjwxkbmT9eVRoG05w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/human-signals": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", @@ -5205,6 +5565,13 @@ "node": ">=0.10.0" } }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true, + "license": "MIT" + }, "node_modules/is-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", @@ -5289,7 +5656,58 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsesc": { + "node_modules/jsdom": { + "version": "24.1.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", + "integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssstyle": "^4.0.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.12", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.7.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.4", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^2.11.2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", @@ -5401,6 +5819,13 @@ "integrity": "sha512-oHnmiBUVHz1V+URE77PNot2lv3QiYU2zQf1JjOVkMt3YDKGbu8NAFr+c4mcNOhdsGrB/VpVbRwPwhiXrPhxQbw==", "license": "MIT" }, + "node_modules/kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", + "dev": true, + "license": "MIT" + }, "node_modules/layout-base": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/layout-base/-/layout-base-1.0.2.tgz", @@ -5587,6 +6012,16 @@ "node": ">=0.8.0" } }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, "node_modules/lru-cache": { "version": "10.2.2", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.2.2.tgz", @@ -6255,6 +6690,17 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, "node_modules/node-fetch-native": { "version": "1.6.4", "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", @@ -6333,6 +6779,13 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/nwsapi": { + "version": "2.2.12", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.12.tgz", + "integrity": "sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==", + "dev": true, + "license": "MIT" + }, "node_modules/nypm": { "version": "0.3.11", "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.11.tgz", @@ -6561,6 +7014,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6574,6 +7038,30 @@ "node": ">=6" } }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, "node_modules/pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz", @@ -7393,6 +7881,13 @@ "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true, + "license": "MIT" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -7403,6 +7898,13 @@ "node": ">=6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true, + "license": "MIT" + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7485,6 +7987,16 @@ "node": ">=0.10.0" } }, + "node_modules/relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/repeat-element": { "version": "1.1.4", "resolved": "https://registry.npmmirror.com/repeat-element/-/repeat-element-1.1.4.tgz", @@ -7501,6 +8013,16 @@ "node": ">=0.10" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-relative": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", @@ -7508,6 +8030,13 @@ "dev": true, "license": "MIT" }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "license": "MIT" + }, "node_modules/resize-observer-polyfill": { "version": "1.5.1", "resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", @@ -7619,6 +8148,13 @@ "fsevents": "~2.3.2" } }, + "node_modules/rrweb-cssom": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.7.1.tgz", + "integrity": "sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==", + "dev": true, + "license": "MIT" + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7727,6 +8263,19 @@ } } }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "license": "ISC", + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, "node_modules/scule": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz", @@ -8001,9 +8550,8 @@ "version": "0.5.21", "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "devOptional": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -8013,9 +8561,8 @@ "version": "0.6.1", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "devOptional": true, "license": "BSD-3-Clause", - "optional": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -8371,6 +8918,13 @@ "node": ">= 10" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true, + "license": "MIT" + }, "node_modules/tailwindcss": { "version": "3.4.3", "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.3.tgz", @@ -8551,9 +9105,8 @@ "version": "5.31.3", "resolved": "https://registry.npmmirror.com/terser/-/terser-5.31.3.tgz", "integrity": "sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==", + "devOptional": true, "license": "BSD-2-Clause", - "optional": true, - "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -8571,9 +9124,8 @@ "version": "2.20.3", "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "license": "MIT", - "optional": true, - "peer": true + "devOptional": true, + "license": "MIT" }, "node_modules/text-table": { "version": "0.2.0", @@ -8675,6 +9227,45 @@ "resolved": "https://registry.npmmirror.com/toml/-/toml-3.0.0.tgz", "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" }, + "node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/tr46": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -8702,6 +9293,13 @@ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", "dev": true }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true, + "license": "0BSD" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -8786,6 +9384,22 @@ "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, + "node_modules/unhead": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/unhead/-/unhead-1.11.6.tgz", + "integrity": "sha512-TKTQGUzHKF925VZ4KZVbLfKFzTVTEWfPLaXKmkd/ptEY2FHEoJUF7xOpAWc3K7Jzy/ExS66TL7GnLLjtd4sISg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@unhead/dom": "1.11.6", + "@unhead/schema": "1.11.6", + "@unhead/shared": "1.11.6", + "hookable": "^5.5.3" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, "node_modules/unicorn-magic": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", @@ -9423,6 +10037,17 @@ "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", "deprecated": "Please see https://github.com/lydell/urix#deprecated" }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/use/-/use-3.1.1.tgz", @@ -9646,6 +10271,85 @@ "node": ">=12.0.0" } }, + "node_modules/vite-ssg": { + "version": "0.23.8", + "resolved": "https://registry.npmjs.org/vite-ssg/-/vite-ssg-0.23.8.tgz", + "integrity": "sha512-uWjdxL2PrvmbUxj7K+YFR8hTuhUZ90r2PrP73evsN/XarjQzKvIbbopqczyGUSAdRXggN3C4sdnk4jqDOGbF4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@unhead/dom": "^1.9.15", + "@unhead/vue": "^1.9.15", + "fs-extra": "^11.2.0", + "html-minifier-terser": "^7.2.0", + "html5parser": "^2.0.2", + "jsdom": "^24.1.0", + "kolorist": "^1.8.0", + "prettier": "^3.3.2", + "yargs": "^17.7.2" + }, + "bin": { + "vite-ssg": "bin/vite-ssg.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "critters": "^0.0.24", + "vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0", + "vue": "^3.2.10", + "vue-router": "^4.0.1" + }, + "peerDependenciesMeta": { + "critters": { + "optional": true + }, + "vue-router": { + "optional": true + } + } + }, + "node_modules/vite-ssg/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/vite-ssg/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/vite-ssg/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/vue": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.1.tgz", @@ -9750,11 +10454,13 @@ } }, "node_modules/vue-router": { - "version": "4.3.2", - "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.3.2.tgz", - "integrity": "sha512-hKQJ1vDAZ5LVkKEnHhmm1f9pMiWIBNGF5AwU67PdH7TyXCj/a4hTccuUuYCAMgJK6rO/NVYtQIEN3yL8CECa7Q==", + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.5.tgz", + "integrity": "sha512-4fKZygS8cH1yCyuabAXGUAsyi1b2/o/OKgu/RUb+znIYOxPRxdkytJEx+0wGcpBE1pX6vUgh5jwWOKRGvuA/7Q==", + "dev": true, + "license": "MIT", "dependencies": { - "@vue/devtools-api": "^6.5.1" + "@vue/devtools-api": "^6.6.4" }, "funding": { "url": "https://github.com/sponsors/posva" @@ -9763,11 +10469,44 @@ "vue": "^3.2.0" } }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/w3c-xmlserializer/node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, "node_modules/web-worker": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/web-worker/-/web-worker-1.3.0.tgz", "integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==" }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, "node_modules/webpack-chain": { "version": "4.12.1", "resolved": "https://registry.npmmirror.com/webpack-chain/-/webpack-chain-4.12.1.tgz", @@ -9795,6 +10534,43 @@ "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", "license": "MIT" }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", @@ -9945,6 +10721,28 @@ "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/xml-name-validator": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", @@ -9955,6 +10753,13 @@ "node": ">=12" } }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true, + "license": "MIT" + }, "node_modules/xss": { "version": "1.0.15", "resolved": "https://registry.npmmirror.com/xss/-/xss-1.0.15.tgz", @@ -9975,6 +10780,16 @@ "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", @@ -9992,6 +10807,80 @@ "node": ">= 14" } }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -10005,6 +10894,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zhead": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/zhead/-/zhead-2.2.4.tgz", + "integrity": "sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, "plugi/highlightjs-vue-plugin": { "extraneous": true }, diff --git a/package.json b/package.json index 841e187b..eef0fe11 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "version": "0.0.0", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vite-ssg build", "preview": "vite preview" }, "dependencies": { @@ -27,12 +27,12 @@ "vite": "^5.1.4", "vite-plugin-prismjs": "^0.0.11", "vue": "^3.5.1", - "vue-clipboard3": "^2.0.0", - "vue-router": "4" + "vue-clipboard3": "^2.0.0" }, "devDependencies": { "@stylistic/eslint-plugin-js": "^2.8.0", "@stylistic/eslint-plugin-plus": "^2.8.0", + "@unhead/vue": "^1.11.6", "autoprefixer": "^10.4.18", "eslint": "^9.10.0", "eslint-config-prettier": "^9.1.0", @@ -45,6 +45,8 @@ "sass-loader": "^14.1.1", "svgo": "^3.3.2", "tailwindcss": "^3.4.1", - "vue-eslint-parser": "^9.4.3" + "vite-ssg": "^0.23.8", + "vue-eslint-parser": "^9.4.3", + "vue-router": "^4.4.5" } } diff --git a/src/main.js b/src/main.js index 91d42671..993191f0 100644 --- a/src/main.js +++ b/src/main.js @@ -1,9 +1,8 @@ -import { createApp } from 'vue'; import { createPinia } from 'pinia'; import './style.css'; import 'element-plus/dist/index.css'; import App from './App.vue'; -import router from './router'; +import { routes } from './router'; import { install as VueMonacoEditorPlugin } from '@guolao/vue-monaco-editor'; import VMdPreview from '@kangc/v-md-editor/lib/preview'; @@ -36,34 +35,46 @@ addIcons( MdDeleteforeverOutlined, FaCopy ); +import { ViteSSG } from 'vite-ssg'; // prismjs import Prism from 'prismjs'; -VMdPreview.use(vuepressTheme, { - Prism -}); - // highlightjs import 'highlight.js/styles/stackoverflow-light.css'; // import hljs from 'highlight.js/lib/core'; import './utils/highlightjs'; -const pinia = createPinia(); -pinia.use(piniaPluginPersistedstate); -const app = createApp(App); -for (const [key, component] of Object.entries(ElementPlusIconsVue)) { - app.component(key, component); -} -app.use(VueMonacoEditorPlugin, { - paths: { - // The recommended CDN config - vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs' +let ssgRouter; +export const createApp = ViteSSG( + App, + { routes }, + ({ app, router, initialState }) => { + VMdPreview.use(vuepressTheme, { + Prism + }); + + const pinia = createPinia(); + pinia.use(piniaPluginPersistedstate); + // TODO: https://github.com/antfu-collective/vite-ssg?tab=readme-ov-file#initial-state + + for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component); + } + app.use(VueMonacoEditorPlugin, { + paths: { + // The recommended CDN config + vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs' + } + }); + app.component('VIcon', OhVueIcon); + app.component('AppLink', AppLink); + app.use(router); + app.use(pinia); + app.use(VMdPreview); + + ssgRouter = router; } -}); -app.component('VIcon', OhVueIcon); -app.component('AppLink', AppLink); -app.use(router); -app.use(pinia); -app.use(VMdPreview); -app.mount('#app'); +); + +export { ssgRouter }; diff --git a/src/router.js b/src/router.js index d43e83a1..627a771c 100644 --- a/src/router.js +++ b/src/router.js @@ -1,5 +1,5 @@ -import { createRouter, createWebHistory } from 'vue-router'; -import { setTitle } from './utils/utils.js'; +// import { createRouter, createWebHistory } from 'vue-router'; +// import { setTitle } from './utils/utils.js'; import AppIndex from './pages/index/AppIndex.vue'; import AboutIndex from './pages/about/AboutIndex.vue'; import DownloadIndex from './pages/download/DownloadIndex.vue'; @@ -36,304 +36,308 @@ import AoscWslRelnote from './pages/aosc-os/wsl/relnote/AoscWslRelnote.vue'; import AoscLivekitRequirements from './pages/aosc-os/livekit/requirements/AoscLivekitRequirements.vue'; import AoscWslRequirements from './pages/aosc-os/wsl/requirements/AoscWslRequirements.vue'; -const router = createRouter({ - history: createWebHistory(), - routes: [ - { - path: '/', - name: 'index', - component: AppIndex, - meta: { - title: '社区门户' - } - }, - { - path: '/about', - name: 'about', - component: AboutIndex, - meta: { - title: '关于社区' - } - }, - { - path: '/download', - name: 'download', - component: DownloadIndex, - meta: { - title: '下载中心' - } - }, - { - path: '/aosc-os', - name: 'aoscos', - component: AoscIndex, - meta: { - title: '安同 OS' - }, - children: [ - { - path: '', - name: 'aosc-os-support', - components: { support: AppSupport }, - props: true - } - ] - }, - { - path: '/aosc-os/requirements', - name: 'aoscossysreq', - component: AoscRequirements, - meta: { - title: '系统配置需求表(安同 OS)' - } - }, - { - path: '/aosc-os/right-for-me', - name: 'aoscosrightforme', - component: AoscRightForMe, - meta: { - title: '安同 OS 适合我吗?' - } - }, - { - path: '/aosc-os/livekit/requirements', - name: 'livekitsysreq', - component: AoscLivekitRequirements, - meta: { - title: '系统配置需求表 (LiveKit)' - } - }, - { - path: '/aosc-os/wsl/requirements', - name: 'wslsysreq', - component: AoscWslRequirements, - meta: { - title: '系统配置需求表 (AOSC OS on WSL)' - } - }, - { - path: '/aosc-os/isa', - name: 'aoscosisamatrix', - component: AoscIsa, - meta: { - title: '架构支持规格表(安同 OS)' - } - }, - { - path: '/aosc-os/relnote', - name: 'aoscosrelnote', - component: AoscRelnote, - meta: { - title: '发行注记(安同 OS)' - } - }, - { - path: '/aosc-os/livekit/relnote', - name: 'livekitrelnote', - component: AoscLivekitRelnote, - meta: { - title: '发行注记 (LiveKit)' - } - }, - { - path: '/aosc-os/wsl/relnote', - name: 'WSLrelnote', - component: AoscWslRelnote, - meta: { - title: '发行注记 (AOSC OS on WSL)' - } - }, - { - path: '/afterglow', - name: 'afterglow', - component: AfterglowIndex, - meta: { - title: '星霞 OS' - } - }, - { - path: '/afterglow/requirements', - name: 'afterglowsysreq', - component: AfterglowRequirements, - meta: { - title: '系统配置需求表(星霞 OS)' - } - }, - { - path: '/afterglow/isa', - name: 'afterglowisamatrix', - component: AfterglowIsa, - meta: { - title: '架构支持规格表(星霞 OS)' - } - }, - { - path: '/afterglow/relnote', - name: 'afterglowrelnote', - component: AfterglowRelnote, - meta: { - title: '发行注记(星霞 OS)' - } - }, - { - path: '/liblol', - name: 'liblol', - component: LiblolIndex, - meta: { - title: 'libLoL 兼容层' - } - }, - { - path: '/oma', - name: 'oma', - component: OmaIndex, - meta: { - title: '小熊猫包管理' - } - }, - { - path: '/l10n', - name: 'l10n', - component: I10nIndex, - meta: { - title: '软件本地化' - } - }, - { - path: '/contact', - name: 'contact', - component: ContactIndex, - meta: { - title: '联系方式' - } - }, - { - path: '/gallery', - name: 'gallery', - component: GalleryIndex, - meta: { - title: '活动相册' - } - }, - { - path: '/guidelines', - name: 'guidelines', - component: GuidelinesIndex, - meta: { - title: '人际关系准则' - } - }, - { - path: '/mascot', - name: 'mascot', - component: MascotIndex, - meta: { - title: '社区吉祥物' - } - }, - { - path: '/sponsors', - name: 'sponsors', - component: SponsorsIndex, - meta: { - title: '赞助方一览' - } - }, - { - path: '/crowdsourcing', - name: 'crowdsourcing', - component: CrowdsourcingIndex, - meta: { - title: '社区众筹' - } - }, - { - path: '/news', - name: 'news', - component: NewsIndex, - meta: { - title: '新闻资讯' - } - }, - { - path: '/news/list/:category/:categoryTitle', - name: 'newsList', - component: NewsList - }, - { - path: '/news/detail/:newsPath/', - name: 'newsDetail', - component: NewsDetail - }, - { - path: '/mdView/:mdPath/', - name: 'mdView', - component: MdView - }, - { - path: '/paste', - name: 'paste', - component: PasteIndex, - meta: { - title: '公共粘贴板' - } - }, - { - path: '/paste/detail', - name: 'pasteDetail', - component: PasteDetail, - meta: { - title: '公共粘贴板' - } - }, - { - path: '/internship', - name: 'Internship', - component: InternshipIndex, - meta: { - title: '实习资源' - } - }, - { - path: '/events', - name: 'Events', - component: EventsIndex, - meta: { - title: '社区活动' +// TODO + +// const router = createRouter({ +// history: createWebHistory(), +// routes: routes, +// scrollBehavior(to, from, savedPosition) { +// if (to.hash) { +// return { +// el: to.hash, +// behavior: 'smooth' +// }; +// } else { +// return { +// top: 0 +// }; +// } +// } +// }); + +// router.afterEach((to, from) => { +// const meta = to.meta; +// if (meta && meta.title) { +// setTitle(meta.title); +// } +// }); + +// export default router; + +export const routes = [ + { + path: '/', + name: 'index', + component: AppIndex, + meta: { + title: '社区门户' + } + }, + { + path: '/about', + name: 'about', + component: AboutIndex, + meta: { + title: '关于社区' + } + }, + { + path: '/download', + name: 'download', + component: DownloadIndex, + meta: { + title: '下载中心' + } + }, + { + path: '/aosc-os', + name: 'aoscos', + component: AoscIndex, + meta: { + title: '安同 OS' + }, + children: [ + { + path: '', + name: 'aosc-os-support', + components: { support: AppSupport }, + props: true } - }, - { - path: '/404', - name: 'PageNotFound', - meta: { - title: '页面未找到' - }, - component: PageNotFound - }, - { - path: '/:pathMatch(.*)', - component: PageNotFound + ] + }, + { + path: '/aosc-os/requirements', + name: 'aoscossysreq', + component: AoscRequirements, + meta: { + title: '系统配置需求表(安同 OS)' } - ], - scrollBehavior(to, from, savedPosition) { - if (to.hash) { - return { - el: to.hash, - behavior: 'smooth' - }; - } else { - return { - top: 0 - }; + }, + { + path: '/aosc-os/right-for-me', + name: 'aoscosrightforme', + component: AoscRightForMe, + meta: { + title: '安同 OS 适合我吗?' } + }, + { + path: '/aosc-os/livekit/requirements', + name: 'livekitsysreq', + component: AoscLivekitRequirements, + meta: { + title: '系统配置需求表 (LiveKit)' + } + }, + { + path: '/aosc-os/wsl/requirements', + name: 'wslsysreq', + component: AoscWslRequirements, + meta: { + title: '系统配置需求表 (AOSC OS on WSL)' + } + }, + { + path: '/aosc-os/isa', + name: 'aoscosisamatrix', + component: AoscIsa, + meta: { + title: '架构支持规格表(安同 OS)' + } + }, + { + path: '/aosc-os/relnote', + name: 'aoscosrelnote', + component: AoscRelnote, + meta: { + title: '发行注记(安同 OS)' + } + }, + { + path: '/aosc-os/livekit/relnote', + name: 'livekitrelnote', + component: AoscLivekitRelnote, + meta: { + title: '发行注记 (LiveKit)' + } + }, + { + path: '/aosc-os/wsl/relnote', + name: 'WSLrelnote', + component: AoscWslRelnote, + meta: { + title: '发行注记 (AOSC OS on WSL)' + } + }, + { + path: '/afterglow', + name: 'afterglow', + component: AfterglowIndex, + meta: { + title: '星霞 OS' + } + }, + { + path: '/afterglow/requirements', + name: 'afterglowsysreq', + component: AfterglowRequirements, + meta: { + title: '系统配置需求表(星霞 OS)' + } + }, + { + path: '/afterglow/isa', + name: 'afterglowisamatrix', + component: AfterglowIsa, + meta: { + title: '架构支持规格表(星霞 OS)' + } + }, + { + path: '/afterglow/relnote', + name: 'afterglowrelnote', + component: AfterglowRelnote, + meta: { + title: '发行注记(星霞 OS)' + } + }, + { + path: '/liblol', + name: 'liblol', + component: LiblolIndex, + meta: { + title: 'libLoL 兼容层' + } + }, + { + path: '/oma', + name: 'oma', + component: OmaIndex, + meta: { + title: '小熊猫包管理' + } + }, + { + path: '/l10n', + name: 'l10n', + component: I10nIndex, + meta: { + title: '软件本地化' + } + }, + { + path: '/contact', + name: 'contact', + component: ContactIndex, + meta: { + title: '联系方式' + } + }, + { + path: '/gallery', + name: 'gallery', + component: GalleryIndex, + meta: { + title: '活动相册' + } + }, + { + path: '/guidelines', + name: 'guidelines', + component: GuidelinesIndex, + meta: { + title: '人际关系准则' + } + }, + { + path: '/mascot', + name: 'mascot', + component: MascotIndex, + meta: { + title: '社区吉祥物' + } + }, + { + path: '/sponsors', + name: 'sponsors', + component: SponsorsIndex, + meta: { + title: '赞助方一览' + } + }, + { + path: '/crowdsourcing', + name: 'crowdsourcing', + component: CrowdsourcingIndex, + meta: { + title: '社区众筹' + } + }, + { + path: '/news', + name: 'news', + component: NewsIndex, + meta: { + title: '新闻资讯' + } + }, + { + path: '/news/list/:category/:categoryTitle', + name: 'newsList', + component: NewsList + }, + { + path: '/news/detail/:newsPath/', + name: 'newsDetail', + component: NewsDetail + }, + { + path: '/mdView/:mdPath/', + name: 'mdView', + component: MdView + }, + { + path: '/paste', + name: 'paste', + component: PasteIndex, + meta: { + title: '公共粘贴板' + } + }, + { + path: '/paste/detail', + name: 'pasteDetail', + component: PasteDetail, + meta: { + title: '公共粘贴板' + } + }, + { + path: '/internship', + name: 'Internship', + component: InternshipIndex, + meta: { + title: '实习资源' + } + }, + { + path: '/events', + name: 'Events', + component: EventsIndex, + meta: { + title: '社区活动' + } + }, + { + path: '/404', + name: 'PageNotFound', + meta: { + title: '页面未找到' + }, + component: PageNotFound + }, + { + path: '/:pathMatch(.*)', + component: PageNotFound } -}); - -router.afterEach((to, from) => { - const meta = to.meta; - if (meta && meta.title) { - setTitle(meta.title); - } -}); - -export default router; +]; diff --git a/src/utils/utils.js b/src/utils/utils.js index 37531ab9..82175039 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1,4 +1,4 @@ -import router from '../router.js'; +import { ssgRouter as router } from '../main.js'; import axios from 'axios'; import { ElMessage } from 'element-plus'; import yaml from 'js-yaml'; diff --git a/vite.config.js b/vite.config.js index c3de265f..9644519a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -57,5 +57,8 @@ export default defineConfig({ rewrite: (path) => path.replace(/^\/pasteApi/, '') } } + }, + ssr: { + noExternal: true } });