-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
67 lines (61 loc) · 1.59 KB
/
astro.config.mjs
File metadata and controls
67 lines (61 loc) · 1.59 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
import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'
import mdx from '@astrojs/mdx'
import mdxConfig from './src/lib/markdown.mjs'
// https://astro.build/config
import preact from '@astrojs/preact'
// https://astro.build/config
import partytown from '@astrojs/partytown'
// Font optimization
import webfontDownload from 'vite-plugin-webfont-dl'
import { FontaineTransform } from 'fontaine'
// https://astro.build/config
import netlify from '@astrojs/netlify'
// https://astro.build/config
export default defineConfig({
security: {
checkOrigin: false,
},
adapter: netlify({
imageCDN: false,
}),
image: {
remotePatterns: [{ protocol: 'https' }],
},
markdown: {
shikiConfig: {
theme: 'material-theme-lighter',
},
},
vite: {
ssr: {
external: ['better-sqlite3'],
noExternal: [
'@astro-community/astro-embed-youtube',
'@react-hookz/web',
'chartjs-adapter-date-fns',
'react-icons',
],
},
},
integrations: [
tailwind(),
mdx(mdxConfig),
preact({
compat: true,
}),
partytown({
config: {
forward: ['dataLayer.push'],
},
}),
webfontDownload(
'https://fonts.googleapis.com/css2?family=Arvo:ital,wght@0,400;0,700;1,400;1,700&family=Fira+Code&family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=fallback'
),
FontaineTransform.vite({
fallbacks: ['ui-sans-serif', 'Helvetica Neue', 'Arial', 'sans-serif'],
resolvePath: (id) =>
new URL(`./public/astro-fontaine${id}`, import.meta.url),
}),
],
})