From 2494169c61f7eb51d332032064564ef08e608fe5 Mon Sep 17 00:00:00 2001 From: Kisechan Date: Sat, 15 Mar 2025 22:17:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20@unhead/vue=20=E5=92=8C=20?= =?UTF-8?q?vite-plugin-sitemap=20=E4=BE=9D=E8=B5=96=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=B7=AF=E7=94=B1=E5=85=83=E4=BF=A1=E6=81=AF=E4=BB=A5?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E6=8F=8F=E8=BF=B0=E6=A0=87=E7=AD=BE=EF=BC=8C?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=20sitemap=20=E6=8F=92=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20robots.txt=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 54 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 4 +++- public/robots.txt | 3 +++ src/App.vue | 15 ++++++++++++- src/main.js | 3 +++ src/router/index.js | 31 +++++++++++++++++++++++--- vite.config.js | 27 ++++++++++++++++------- 7 files changed, 123 insertions(+), 14 deletions(-) create mode 100644 public/robots.txt diff --git a/package-lock.json b/package-lock.json index b6e0bf1..90e5038 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@fortawesome/fontawesome-free": "^6.7.2", + "@unhead/vue": "^0.7.0", "element-plus": "^2.9.5", "github-calendar": "^2.3.4", "js-yaml": "^4.1.0", @@ -22,7 +23,8 @@ "@vitejs/plugin-vue": "^5.2.1", "path": "^0.12.7", "unplugin-vue-components": "^28.4.1", - "vite": "^6.2.0" + "vite": "^6.2.0", + "vite-plugin-sitemap": "^0.7.1" } }, "node_modules/@babel/helper-string-parser": { @@ -799,6 +801,35 @@ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", "integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==" }, + "node_modules/@unhead/schema": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-0.7.0.tgz", + "integrity": "sha512-AcfB3vbY7v5GxZOBNHjNiseRjtS40N+lXyuxr0Ee42/BBmPNcKa8SuAlSX4iSht7ptdSaxIjrzzTsQDOrDllYA==", + "license": "MIT", + "dependencies": { + "@zhead/schema": "1.0.1", + "hookable": "^5.4.1" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/vue": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@unhead/vue/-/vue-0.7.0.tgz", + "integrity": "sha512-OoJk+zoLObUaetm9yRJXmxoS8PiZgxSnr1oS6VziWm1ImBQ7/kzvOAMiaKVg63JmjOB6Knr3rKSCL7Y+VITOiw==", + "license": "MIT", + "dependencies": { + "@unhead/schema": "0.7.0", + "hookable": "^5.4.1" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "vue": ">=2.7 || >=3" + } + }, "node_modules/@vitejs/plugin-vue": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz", @@ -991,6 +1022,15 @@ } } }, + "node_modules/@zhead/schema": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@zhead/schema/-/schema-1.0.1.tgz", + "integrity": "sha512-n6BDs+MjSOesuv6krG2QGyCPfdndxWX0M/G2wEGu1SPHc5jLHHi3EY1+vQvudFVXRVXquZHKsDPE7pSyeyGgHg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, "node_modules/acorn": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", @@ -1308,6 +1348,12 @@ "node": ">= 6" } }, + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", + "license": "MIT" + }, "node_modules/inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -1890,6 +1936,12 @@ } } }, + "node_modules/vite-plugin-sitemap": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/vite-plugin-sitemap/-/vite-plugin-sitemap-0.7.1.tgz", + "integrity": "sha512-4NRTkiWytLuAmcikckrLcLl9iYA20+5v6l8XshcOrzxH1WR8H0O3S6sTQYfjMrE8su/LG6Y0cTodvOdcOIxaLw==", + "dev": true + }, "node_modules/vue": { "version": "3.5.13", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz", diff --git a/package.json b/package.json index 5cf9b1d..b3e2ff6 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@fortawesome/fontawesome-free": "^6.7.2", + "@unhead/vue": "^0.7.0", "element-plus": "^2.9.5", "github-calendar": "^2.3.4", "js-yaml": "^4.1.0", @@ -23,6 +24,7 @@ "@vitejs/plugin-vue": "^5.2.1", "path": "^0.12.7", "unplugin-vue-components": "^28.4.1", - "vite": "^6.2.0" + "vite": "^6.2.0", + "vite-plugin-sitemap": "^0.7.1" } } diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..296dd18 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Sitemap: https://www.kisechan.space/sitemap.xml \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 62f7d39..1028e24 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,22 @@