mirror of
https://github.com/RhenCloud/Cloud-Home.git
synced 2026-01-22 17:39:07 +08:00
feat: 添加 @nuxtjs/robots 模块以支持搜索引擎优化
This commit is contained in:
1
bun.lock
1
bun.lock
@@ -10,6 +10,7 @@
|
|||||||
"@nuxt/icon": "^2.2.0",
|
"@nuxt/icon": "^2.2.0",
|
||||||
"@nuxt/image": "2.0.0",
|
"@nuxt/image": "2.0.0",
|
||||||
"@nuxtjs/icon": "^2.6.0",
|
"@nuxtjs/icon": "^2.6.0",
|
||||||
|
"@nuxtjs/robots": "^5.6.7",
|
||||||
"@nuxtjs/seo": "3.3.0",
|
"@nuxtjs/seo": "3.3.0",
|
||||||
"@nuxtjs/sitemap": "^7.5.2",
|
"@nuxtjs/sitemap": "^7.5.2",
|
||||||
"nodemailer": "^7.0.12",
|
"nodemailer": "^7.0.12",
|
||||||
|
|||||||
@@ -5,7 +5,15 @@ import tailwindcss from "@tailwindcss/vite";
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: "2025-12-12",
|
compatibilityDate: "2025-12-12",
|
||||||
srcDir: "app",
|
srcDir: "app",
|
||||||
modules: ["@nuxt/image", "@nuxt/eslint", "@nuxtjs/sitemap", "@nuxt/icon", "@nuxtjs/seo"],
|
|
||||||
|
modules: [
|
||||||
|
"@nuxt/image",
|
||||||
|
"@nuxt/eslint",
|
||||||
|
"@nuxtjs/robots",
|
||||||
|
"@nuxtjs/sitemap",
|
||||||
|
"@nuxt/icon",
|
||||||
|
"@nuxtjs/seo",
|
||||||
|
],
|
||||||
|
|
||||||
// 禁用 Vue Router 的非关键警告
|
// 禁用 Vue Router 的非关键警告
|
||||||
vue: {
|
vue: {
|
||||||
@@ -39,6 +47,12 @@ export default defineNuxtConfig({
|
|||||||
"/friends": { prerender: true },
|
"/friends": { prerender: true },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
robots: { groups: [{ userAgent: ["GPTBot", "ChatGPT-User"], disallow: ["/"] }] },
|
||||||
|
|
||||||
|
sitemap: {
|
||||||
|
zeroRuntime: true,
|
||||||
|
},
|
||||||
|
|
||||||
app: {
|
app: {
|
||||||
head: {
|
head: {
|
||||||
charset: "utf-8",
|
charset: "utf-8",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"@nuxt/icon": "^2.2.0",
|
"@nuxt/icon": "^2.2.0",
|
||||||
"@nuxt/image": "2.0.0",
|
"@nuxt/image": "2.0.0",
|
||||||
"@nuxtjs/icon": "^2.6.0",
|
"@nuxtjs/icon": "^2.6.0",
|
||||||
|
"@nuxtjs/robots": "^5.6.7",
|
||||||
"@nuxtjs/seo": "3.3.0",
|
"@nuxtjs/seo": "3.3.0",
|
||||||
"@nuxtjs/sitemap": "^7.5.2",
|
"@nuxtjs/sitemap": "^7.5.2",
|
||||||
"nodemailer": "^7.0.12",
|
"nodemailer": "^7.0.12",
|
||||||
|
|||||||
Reference in New Issue
Block a user