-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
86 lines (81 loc) · 2.48 KB
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import mdx from '@astrojs/mdx'
import preact from '@astrojs/preact'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import expressiveCode from 'astro-expressive-code'
import robotsTxt from 'astro-robots-txt'
import { defineConfig } from 'astro/config'
import { fileURLToPath } from 'url'
import { dirname, join } from 'path'
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
// Mdx plugins
import rehypeExternalLinks from 'rehype-external-links'
/** @type {import('rehype-external-links').Options} */
const externalLinksOptions = {
target: '_blank',
rel: ['noopener', 'noreferrer']
}
// https://astro.build/config
export default defineConfig({
base: '/',
site: 'https://rxtsel.dev',
integrations: [
sitemap(),
tailwind(),
robotsTxt(),
expressiveCode({
themes: ['github-dark', 'solarized-dark'],
styleOverrides: {
frames: {
shadowColor: 'transparent',
editorBackground: 'transparent',
editorTabBarBackground: '#262626',
editorTabBarBorderColor: 'transparent',
editorActiveTabBackground: '#1d1d1d',
editorActiveTabIndicatorTopColor: '#4895EF',
tooltipSuccessBackground: '#4895EF',
terminalBackground: '#1d1d1d',
terminalBorder: 'transparent',
terminalTabActiveBorder: '#4895EF',
terminalTabActiveBackground: '#1d1d1d',
terminalTitlebarBackground: '#1d1d1d'
},
borderColor: '#262626',
borderRadius: '0.375rem'
}
}),
mdx({
rehypePlugins: [[rehypeExternalLinks, externalLinksOptions]]
}),
preact()
],
markdown: {
rehypePlugins: [[rehypeExternalLinks, externalLinksOptions]]
},
redirects: {
'/blog/240129-comandos-basicos-de-neovim/': {
status: 301,
destination: '/es/blog/basic-commands-for-neovim/'
},
'/en/blog/how-to-install-husky-and-commitlint-in-your-projects-a-step-by-step-guide':
{
status: 301,
destination:
'/en/blog/how-to-install-husky-commitlint-and-lint-staged-in-your-projects-a-step-by-step-guide/'
},
'es/blog/how-to-install-husky-and-commitlint-in-your-projects-a-step-by-step-guide':
{
status: 301,
destination:
'/es/blog/how-to-install-husky-commitlint-and-lint-staged-in-your-projects-a-step-by-step-guide/'
}
},
vite: {
resolve: {
alias: {
'@': join(__dirname, 'src')
}
}
}
})