import config from './config' // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ app: { head: { htmlAttrs: { lang: config.locale || 'en', }, link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico', }, ], meta: [ { charset: 'utf-8', }, { name: 'viewport', content: 'width=device-width, initial-scale=1', }, { 'http-equiv': 'X-UA-Compatible', content: 'ie=edge', }, ], }, pageTransition: { name: 'page', mode: 'out-in' }, rootId: 'ender-app', }, features: { inlineStyles: false, }, components: { dirs: [ { path: '~/components', pathPrefix: false, extensions: ['.vue'], }, ], }, css: ['~/assets/styles/main.scss'], plugins: [], modules: [ ['@nuxtjs/eslint-module', { failOnError: false, lintOnStart: false }], ['@nuxtjs/stylelint-module', { failOnError: true, lintOnStart: false }], '@pinia/nuxt', '@nuxt/content', 'vuetify-nuxt-module', '@nuxtjs/google-fonts', 'nuxt-site-config', 'nuxt-simple-sitemap', 'nuxt-simple-robots', 'nuxt-og-image', 'nuxt-link-checker', ], content: { markdown: { remarkPlugins: ['remark-reading-time'], }, }, nitro: { prerender: { crawlLinks: true, autoSubfolderIndex: true, failOnError: true, routes: ['/robots.txt', '/sitemap.xml'], }, }, vuetify: { moduleOptions: { importComposables: true, prefixComposables: true, styles: { configFile: config.theme.file, }, includeTransformAssetsUrls: true, ssrClientHints: { reloadOnFirstRequest: false, viewportSize: true, prefersColorScheme: true, prefersColorSchemeOptions: { cookieName: config.theme.cookie, lightThemeName: config.theme.light, darkThemeName: config.theme.dark, useBrowserThemeOnly: true, }, prefersReducedMotion: false, }, }, vuetifyOptions: { ssr: { clientWidth: 0, clientHeight: 0, }, components: false, labComponents: true, directives: false, date: { adapter: 'vuetify', }, theme: { defaultTheme: config.theme.default, themes: config.theme.themes, }, icons: { defaultSet: 'custom', }, defaults: { VBtn: { style: 'text-transform: none; letter-spacing: normal;', }, }, }, }, googleFonts: { download: true, families: { Lato: true, Alexandria: true, }, }, site: { env: process.env.NODE_ENV, url: config.url, name: config.name, indexable: true, trailingSlash: false, }, linkChecker: { failOnError: true, report: { html: true, markdown: true, }, }, routeRules: { '/': { sitemap: { changefreq: 'yearly', priority: 1, }, }, '/about': { sitemap: { changefreq: 'yearly', priority: 0.8, }, }, '/projects': { sitemap: { changefreq: 'monthly', priority: 0.8, }, }, '/social': { sitemap: { changefreq: 'yearly', priority: 0.8, }, }, }, sitemap: { cacheMaxAgeSeconds: 360, exclude: [], credits: false, xslColumns: [ { label: 'URL', width: '50%' }, { label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' }, { label: 'Priority', select: 'sitemap:priority', width: '12.5%' }, { label: 'Change Frequency', select: 'sitemap:changefreq', width: '12.5%', }, ], // defaults: { ← Defaults override route rules... // changefreq: 'monthly', // priority: 0.7, // lastmod: buildDate, // }, }, robots: { enabled: true, metaTag: true, blockNonSeoBots: true, credits: false, }, typescript: { typeCheck: true, }, vue: { compilerOptions: { isCustomElement: (tag) => tag === 'iconify-icon', }, }, })