/
astro.config.ts
61 lines (60 loc) · 1.41 KB
/
astro.config.ts
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
import cloudflare from '@astrojs/cloudflare'
import mdx from '@astrojs/mdx'
import react from '@astrojs/react'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import expressiveCode from 'astro-expressive-code'
import icon from 'astro-icon'
import pagefind from 'astro-pagefind'
import { defineConfig } from 'astro/config'
import rehypeExternalLinks from 'rehype-external-links'
import remarkUnwrapImages from 'remark-unwrap-images'
import arraybuffer from 'vite-plugin-arraybuffer'
import { remarkReadingTime } from './src/lib/remark-reading-time'
import { expressiveCodeOptions } from './src/site.config'
// https://astro.build/config
export default defineConfig({
site: 'https://mikepayne.me',
integrations: [
expressiveCode(expressiveCodeOptions),
sitemap(),
pagefind(),
mdx(),
icon(),
react(),
tailwind({ applyBaseStyles: false })
],
vite: {
// @ts-ignore
plugins: [arraybuffer()]
},
image: {
domains: ['webmention.io']
},
markdown: {
remarkPlugins: [remarkUnwrapImages, remarkReadingTime],
rehypePlugins: [
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow, noopener, noreferrer']
}
]
],
remarkRehype: {
footnoteLabelProperties: {
className: ['underline']
}
}
},
prefetch: true,
output: 'hybrid',
adapter: cloudflare({
wasmModuleImports: true,
imageService: 'compile',
platformProxy: {
enabled: true
}
})
})