import packageJSON from './package.json' const websiteName = "Enderman's Website" const websiteURL = 'https://enderman.ch' const buildDate = new Date().toISOString().split('T')[0] // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ app: { head: { htmlAttrs: { lang: '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', }, components: { dirs: [ { path: '~/components', pathPrefix: false, extensions: ['.vue'], }, ], }, css: ['~/assets/styles/main.scss'], plugins: [], modules: [ '@pinia/nuxt', '@nuxt/content', 'nuxt-quasar-ui', ['@nuxtjs/eslint-module', { failOnError: false, lintOnStart: false }], ['@nuxtjs/stylelint-module', { failOnError: true, lintOnStart: false }], '@nuxtjs/color-mode', '@nuxtjs/google-fonts', 'nuxt-simple-sitemap', 'nuxt-simple-robots', 'nuxt-link-checker', 'nuxt-og-image', ], nitro: { prerender: { crawlLinks: true, autoSubfolderIndex: true, failOnError: true, routes: ['/robots.txt', '/sitemap.xml'], }, }, quasar: { lang: 'en-US', }, googleFonts: { download: true, families: { Lato: true, Alexandria: true, }, }, site: { url: websiteURL, name: websiteName, }, 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: { blockNonSeoBots: true, credits: false, }, linkChecker: { failOnError: true, report: { html: true, markdown: true, }, }, typescript: { typeCheck: true, }, runtimeConfig: { public: { version: JSON.stringify(packageJSON.version).slice(1, -1), buildDate, websiteName, websiteURL, }, }, /* vite: { build: { rollupOptions: { output: { manualChunks(id: string) { if (id.includes('node_modules')) { return id .toString() .split('node_modules/')[1] .split('/')[0] .toString() } }, }, }, }, }, */ })