-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathastro.config.mjs
48 lines (45 loc) · 1.13 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
import { defineConfig } from 'astro/config';
import remarkToc from 'remark-toc';
import sitemap from '@astrojs/sitemap';
import tailwind from "@astrojs/tailwind";
import mdx from "@astrojs/mdx";
import customRemarkPlugin from './src/remark/customRemarkPlugin';
import partytown from '@astrojs/partytown';
import rehypeExternalLinks from 'rehype-external-links';
export const site = process.env['VERCEL'] ? `https://${process.env['VERCEL_PROJECT_PRODUCTION_URL']}` : undefined;
// https://astro.build/config
export default defineConfig({
site: site,
i18n: {
locales: ['en', 'ja'],
defaultLocale: 'en',
fallback: {
ja: 'en',
},
routing: {
fallbackType: 'rewrite',
}
},
integrations: [
tailwind(),
sitemap({
i18n: {
defaultLocale: 'en',
locales: {
en: 'en-US',
ja: 'ja-JP',
}
},
}),
mdx(),
partytown({
config: {
forward: ["dataLayer.push"],
},
})
],
markdown: {
remarkPlugins: [remarkToc, customRemarkPlugin],
rehypePlugins: [[rehypeExternalLinks, {target: '_blank', ref: 'nofollow'}]],
},
});