-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
35 lines (32 loc) · 1.04 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
import { defineConfig } from 'astro/config';
import { SITE, SITEMAP_LOCALES } from './src/consts.ts';
import preact from '@astrojs/preact';
import react from '@astrojs/react';
import sitemap from "@astrojs/sitemap";
import astroI18next from "astro-i18next";
import vercel from '@astrojs/vercel/static';
console.log("Ouput dir: " + SITE.outDir);
// https://astro.build/config
export default defineConfig({
trailingSlash: "always", //Sitemap uses trailing /, we gotta be consistent. This affects dev and production differently
outDir: SITE.outDir,
integrations: [
// Enable Preact to support Preact JSX components.
preact(),
// Enable React for the Algolia search component.
react(),
sitemap({
i18n: {
defaultLocale: SITE.defaultLanguage, // All urls that don't contain `es` or `fr` after `domain.com/` will be treated as default locale, i.e. `en`
locales: SITEMAP_LOCALES,
},
serialize(sitemapItem) {
return sitemapItem;
},
}),
astroI18next()
],
site: SITE.address,
output: 'static',
adapter: vercel({analytics: true})
});