mirror of
https://github.com/RhenCloud/Cloud-Home.git
synced 2026-01-22 17:39:07 +08:00
chore:一些修复
This commit is contained in:
@@ -5,18 +5,7 @@ import tailwindcss from "@tailwindcss/vite";
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: "2025-12-12",
|
||||
srcDir: "app/",
|
||||
modules: ["@nuxt/image", "@nuxt/eslint", "@nuxtjs/sitemap"],
|
||||
|
||||
// eslint: {
|
||||
// config: {
|
||||
// extends: ["plugin:nuxt/recommended", "prettier"],
|
||||
// plugins: ["prettier"],
|
||||
// rules: {
|
||||
// "prettier/prettier": "error",
|
||||
// },
|
||||
// stylistic: true
|
||||
// },
|
||||
// },
|
||||
modules: ["@nuxt/image", "@nuxt/eslint", "@nuxtjs/sitemap", "@nuxtjs/seo"],
|
||||
|
||||
// 禁用 Vue Router 的非关键警告
|
||||
vue: {
|
||||
@@ -32,11 +21,6 @@ export default defineNuxtConfig({
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
|
||||
site: {
|
||||
url: siteConfig.siteMeta.url,
|
||||
title: siteConfig.siteMeta.title,
|
||||
},
|
||||
|
||||
routeRules: {
|
||||
"/": { prerender: true },
|
||||
"/about": { isr: 3600 },
|
||||
@@ -47,9 +31,22 @@ export default defineNuxtConfig({
|
||||
|
||||
app: {
|
||||
head: {
|
||||
charset: "utf-8",
|
||||
viewport: "width=device-width,initial-scale=1,maximum-scale=5",
|
||||
title: siteConfig.siteMeta.title,
|
||||
titleTemplate: `%s - ${siteConfig.siteMeta.title}`,
|
||||
meta: [
|
||||
{ name: "author", content: siteConfig.siteMeta.author },
|
||||
{ name: "language", content: "zh-CN" },
|
||||
{ name: "description", content: siteConfig.siteMeta.description },
|
||||
],
|
||||
link: [
|
||||
{ rel: "icon", href: siteConfig.siteMeta.icon },
|
||||
{ rel: "icon", href: siteConfig.siteMeta.favicon, type: "image/svg+xml" },
|
||||
{ rel: "canonical", href: siteConfig.siteMeta.url },
|
||||
{ rel: "alternate", hreflang: siteConfig.siteMeta.lang, href: siteConfig.siteMeta.url },
|
||||
{ rel: "dns-prefetch", href: siteConfig.siteMeta.url },
|
||||
{ rel: "preconnect", href: siteConfig.siteMeta.url },
|
||||
{ rel: "icon", href: siteConfig.siteMeta.favicon },
|
||||
// Font Awesome CDN 预加载和优化
|
||||
{
|
||||
rel: "preload",
|
||||
@@ -73,6 +70,8 @@ export default defineNuxtConfig({
|
||||
},
|
||||
],
|
||||
},
|
||||
pageTransition: { name: "page", mode: "out-in" },
|
||||
layoutTransition: { name: "layout", mode: "out-in" },
|
||||
},
|
||||
|
||||
nitro: {
|
||||
@@ -91,9 +90,11 @@ export default defineNuxtConfig({
|
||||
senderEmail: process.env.SENDER_EMAIL ?? "",
|
||||
adminEmail: process.env.ADMIN_EMAIL ?? "",
|
||||
smtpSecure: process.env.SMTP_SECURE ? process.env.SMTP_SECURE === "true" : undefined,
|
||||
wakatimeApiKey: process.env.WAKATIME_API_KEY ?? "",
|
||||
wakatimeApiUrl: process.env.WAKATIME_API_URL ?? "https://wakatime.com/api/v1",
|
||||
githubToken: process.env.NUXT_PUBLIC_GITHUB_TOKEN ?? "",
|
||||
umamiApiKey: process.env.UMAMI_API_KEY ?? "",
|
||||
public: {
|
||||
wakatimeApiKey: process.env.WAKATIME_API_KEY ?? "",
|
||||
wakatimeApiUrl: process.env.WAKATIME_API_URL ?? "https://wakatime.com/api/v1",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user