import { fileURLToPath } from 'url' import { dirname, join } from 'path' const url = process.env.BASE_URL || 'http://localhost:3000' const name = process.env.SITE_NAME || 'Bloggrify' const indexable = process.env.SITE_INDEXABLE || false const currentDir = dirname(fileURLToPath(import.meta.url)) export default defineNuxtConfig({ alias: { '#core': currentDir + '/app' }, site: { indexable, url, name }, ogImage: { zeroRuntime: true }, // Every site defaults to light mode. A theme enables dark mode simply by rendering a // toggle (e.g. UColorModeButton); themes that don't (bento/epoxia/mistral) stay light. // This keeps color-mode handling declarative and out of the shared app.vue. colorMode: { preference: 'light', fallback: 'light' }, runtimeConfig: { public: { url: url, } }, css: [join(currentDir, './app/assets/css/core.css')], devtools: {enabled: true}, // Easy access to enabling sourcemaps for debugging sourcemap: { // server: true, // client: true }, modules: [ '@nuxt/eslint', '@nuxt/ui', '@nuxt/image', '@vueuse/nuxt', '@stefanobartoletti/nuxt-social-share', '@nuxtjs/robots', '@nuxtjs/sitemap', 'nuxt-schema-org', '@nuxt/content', 'nuxt-og-image', ], sitemap: { zeroRuntime: true }, content: { build: { markdown: { remarkPlugins: {'remark-reading-time': {}, 'remark-math': {}, 'remark-mermaidjs': {}}, rehypePlugins: {'rehype-katex': {}}, highlight: { langs: [ 'json', 'js', 'javascript', 'ts', 'typescript', 'html', 'css', 'vue', 'shell', 'bash', 'mdc', 'mermaid', 'md', 'yaml', 'python', 'c', 'csharp', 'cpp', 'sql', 'java', 'xml', 'scala', 'kotlin', ], theme: { default: 'catppuccin-frappe', // Theme used if `html.dark` dark: 'github-dark', }, }, }, }, }, experimental: { defaults: { nuxtLink: { trailingSlash: 'remove', } } }, nitro: { prerender: { routes: ['/rss.xml'], }, }, vue: { compilerOptions: { isCustomElement: (tag) => ['hyvor-talk-comments'].includes(tag), }, }, compatibilityDate: '2024-11-23', })