Files
estel_docs/.github/nuxt.config.ts
2025-07-29 00:32:57 +08:00

105 lines
1.9 KiB
TypeScript

import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import tailwindcss from '@tailwindcss/vite'
const currentDir = dirname(fileURLToPath(import.meta.url))
export default defineNuxtConfig({
modules: [
'shadcn-nuxt',
'@vueuse/nuxt',
'@ztl-uwu/nuxt-content',
'@nuxt/image',
'@nuxt/icon',
'@nuxtjs/color-mode',
'nuxt-og-image',
'@nuxt/scripts',
'@nuxtjs/i18n',
'@nuxt/fonts'
],
components: {
dirs: [
{
path: './components',
ignore: ['**/*.ts']
}
]
},
devtools: { enabled: true },
css: [
join(currentDir, './assets/css/themes.css'),
'~/assets/css/tailwind.css'
],
colorMode: {
classSuffix: '',
disableTransition: true
},
content: {
documentDriven: true,
highlight: {
theme: {
default: 'github-light',
dark: 'github-dark'
},
preload: ['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'mdc', 'yaml', 'bash', 'ini', 'dotenv']
},
navigation: {
fields: [
'icon',
'navBadges',
'navTruncate',
'badges',
'toc',
'sidebar',
'collapse',
'editLink',
'prevNext',
'breadcrumb',
'fullpage'
]
},
experimental: {
search: {
indexed: true
}
}
},
compatibilityDate: '2025-05-13',
vite: {
plugins: [
tailwindcss()
],
optimizeDeps: {
include: ['debug']
}
},
typescript: {
tsConfig: {
compilerOptions: {
baseUrl: '.'
}
}
},
fonts: {
defaults: {
weights: ['300 800']
}
},
i18n: {
bundle: {
optimizeTranslationDirective: false
},
strategy: 'prefix_except_default'
},
icon: {
clientBundle: {
scan: true,
sizeLimitKb: 512
}
},
shadcn: {
prefix: 'Ui',
componentDir: join(currentDir, './components/ui')
}
})