cleanup + better code blocks + redirects
This commit is contained in:
parent
703d1d7f08
commit
fa61a28160
34 changed files with 284 additions and 888 deletions
|
@ -1,30 +1,58 @@
|
|||
import { defineConfig } from 'astro/config'
|
||||
|
||||
import { transformerMetaHighlight } from '@shikijs/transformers'
|
||||
|
||||
// https://astro.build/config
|
||||
import mdx from '@astrojs/mdx'
|
||||
import sitemap from '@astrojs/sitemap'
|
||||
|
||||
// https://astro.build/config
|
||||
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'
|
||||
},
|
||||
i18n: {
|
||||
locales: ['fr', 'en'],
|
||||
defaultLocale: 'fr'
|
||||
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: [mdx(), sitemap()],
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
integrations: [
|
||||
expressiveCode({
|
||||
theme: 'one-dark-pro',
|
||||
transformers: [transformerMetaHighlight()]
|
||||
}
|
||||
}
|
||||
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()
|
||||
]
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue