import siteConfig from "./app/config"; import tailwindcss from "@tailwindcss/vite"; // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ compatibilityDate: "2025-12-20", srcDir: "app", css: ["./app/assets/css/main.css"], // components: { // dirs: [ // { // path: "~/components", // extensions: ["vue"], // }, // { // path: "~/components/content", // extensions: ["vue"], // prefix: "Prose", // }, // ], // }, modules: [ "@nuxt/icon", "@nuxt/image", "@nuxt/fonts", "@nuxt/eslint", "@vueuse/nuxt", "@nuxtjs/robots", "@nuxtjs/seo", "@nuxtjs/sitemap", "@nuxt/content", "@nuxtjs/color-mode", // "@nuxtjs/tailwindcss", "@formkit/auto-animate", "@nuxt/ui", // '@stefanobartoletti/nuxt-social-share', ], vite: { plugins: [tailwindcss()], }, 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: "theme-color", content: siteConfig.theme.color }, ], link: [ { rel: "canonical", href: siteConfig.siteMeta.url }, { rel: "alternate", hreflang: "zh-CN", href: siteConfig.siteMeta.url }, { rel: "dns-prefetch", href: siteConfig.siteMeta.url }, { rel: "preconnect", href: siteConfig.siteMeta.url }, ], }, pageTransition: { name: "page", mode: "out-in" }, layoutTransition: { name: "layout", mode: "out-in" }, }, sitemap: { sources: ["/api/__sitemap__/urls"], }, robots: { groups: [{ userAgent: ["GPTBot", "ChatGPT-User"], disallow: ["/"] }] }, site: { url: siteConfig.siteMeta.url, name: siteConfig.siteMeta.title, description: siteConfig.siteMeta.description, author: siteConfig.siteMeta.author, }, typescript: { strict: true, }, postcss: { plugins: { "@tailwindcss/postcss": {}, }, }, nitro: { prerender: { crawlLinks: true, routes: ["/", "/rss.xml"], }, }, // fonts: {}, colorMode: { classSuffix: "", preference: "system", fallback: "light", }, content: { experimental: { nativeSqlite: true }, build: { markdown: { toc: { depth: 4, }, highlight: { theme: "github-dark", langs: ["bash", "c", "python"], }, remarkPlugins: { "remark-gfm": {}, "remark-rehype": {}, }, // rehypePlugins: { // "rehype-prism": {}, // }, }, }, }, });