import { defineConfig } from 'astro/config' import mdx from '@astrojs/mdx' import sitemap from '@astrojs/sitemap' import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers' import expressiveCode from 'astro-expressive-code' export default defineConfig({ site: 'https://www.nardu.in', build: { format: 'directory' }, redirects: { '/en/': { status: 308, destination: '/articles/en-2025' }, '/articles/en/': { status: 308, destination: '/articles/#en-articles' }, '/articles/en/[...id]': { status: 308, destination: '/articles/en-[...id]' }, '/snippets/en/': { status: 308, destination: '/fragments/#en-fragments' }, '/snippets/en/[...id]': { status: 308, destination: '/fragments/en-[...id]' } }, image: { domains: ['assets.nardu.in'], remotePatterns: [{ protocol: 'https' }] }, integrations: [ expressiveCode({ theme: 'one-dark-pro', plugins: [pluginLineNumbers()], defaultProps: { // Disable line numbers by default showLineNumbers: false, // But enable line numbers for certain languages overridesByLang: { 'css,html,js,ts,vue': { showLineNumbers: true } } } }), mdx(), sitemap() ] })