-
Notifications
You must be signed in to change notification settings - Fork 42
/
astro.config.mjs
58 lines (56 loc) · 1.42 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
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import tailwind from '@astrojs/tailwind';
import metaTags from 'astro-meta-tags';
import { defineConfig } from 'astro/config';
import { execSync } from 'child_process';
import rehypeExternalLinks from 'rehype-external-links';
import externalLinkConfig from './plugins/externalLinks';
import partytown from '@astrojs/partytown';
// https://astro.build/config
export default defineConfig({
site: process.env.BRANCH === 'main' ? process.env.URL : process.env.DEPLOY_URL || 'https://gis.utah.gov',
image: {
domains: ['gis.utah.gov'],
},
build: {
assets: '_assets',
},
integrations: [
mdx(),
sitemap(),
tailwind({
applyBaseStyles: false,
}),
react(),
{
name: 'pagefind',
hooks: {
'astro:build:done': () => {
execSync('npx pagefind --site dist', {
stdio: [process.stdin, process.stdout, process.stderr],
});
},
},
},
metaTags(),
partytown({
config: {
debug: true,
forward: [
'dataLayer.push',
'analytics.track',
'analytics.identify',
'analytics.group',
'analytics.reset',
'analytics.user',
'analytics.alias',
],
},
}),
],
markdown: {
rehypePlugins: [[rehypeExternalLinks, externalLinkConfig]],
},
});