-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
97 lines (89 loc) · 2.25 KB
/
astro.config.mjs
File metadata and controls
97 lines (89 loc) · 2.25 KB
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
87
88
89
90
91
92
93
94
95
96
97
// @ts-check
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
// @ts-ignore — @tailwindcss/vite types resolve at runtime (bundler mode)
import tailwindcss from '@tailwindcss/vite';
// import sentry from '@sentry/astro'; // Temporalmente deshabilitado por incompatibilidad de versiones
// https://astro.build/config
export default defineConfig({
site: 'https://crypt0xdev.com',
output: 'static',
// Integraciones
integrations: [
// sentry({
// sourceMapsUploadOptions: {
// project: 'crypt0xdev',
// authToken: process.env.SENTRY_AUTH_TOKEN,
// enabled: process.env.NODE_ENV === 'production',
// },
// }),
sitemap({
i18n: {
defaultLocale: 'es',
locales: {
es: 'es-ES',
en: 'en-US',
},
},
filter: (page) =>
!page.includes('/404') &&
!page.includes('/api/') &&
!page.includes('/_astro/'),
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date(),
}),
// Pagefind - Indexación de búsqueda
{
name: 'pagefind',
hooks: {
'astro:build:done': async () => {
const { execSync } = await import('child_process');
const path = await import('path');
const siteDir = path.join(process.cwd(), 'dist');
execSync(
`npx pagefind --site "${siteDir}" --glob "**/{es,en}/**/*.html"`,
{
stdio: 'inherit',
}
);
},
},
},
],
// Configuración de i18n
i18n: {
defaultLocale: 'es',
locales: ['es', 'en'],
routing: {
prefixDefaultLocale: true,
},
},
// Configuración de markdown
markdown: {
syntaxHighlight: 'shiki',
shikiConfig: {
themes: {
dark: 'one-dark-pro',
light: 'github-light',
},
defaultColor: false,
wrap: true,
langs: [],
},
},
// Performance optimizations (Astro ya optimiza por defecto)
vite: {
plugins: [tailwindcss()],
},
// Configuración del servidor de desarrollo
server: {
port: 4321,
host: true,
},
// Compresión HTML (Astro lo hace por defecto en producción)
compressHTML: true,
build: {
inlineStylesheets: 'auto',
},
});