-
Notifications
You must be signed in to change notification settings - Fork 3
/
astro.config.ts
68 lines (66 loc) · 1.69 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
62
63
64
65
66
67
68
import mdx from '@astrojs/mdx'
import preact from '@astrojs/preact'
import prefetch from '@astrojs/prefetch'
import sitemap from '@astrojs/sitemap'
import tailwind from '@astrojs/tailwind'
import vue from '@astrojs/vue'
import vitePreact from '@preact/preset-vite'
import { defineConfig } from 'astro/config'
import critters from 'astro-critters'
import icon from 'astro-icon'
import robotsTxt from 'astro-robots-txt'
import autolinkHeadings from 'rehype-autolink-headings'
import rehypeExternalLinks from 'rehype-external-links'
import rehypeSlug from 'rehype-slug'
import { tsconfigPaths } from 'vite-plugin-lib'
import { autolinkConfig } from './plugins/rehype-autolink-config'
import { remarkReadingTime } from './plugins/remark-reading-time.js'
// https://astro.build/config
export default defineConfig({
site: 'https://jan-mueller.at',
server: {
host: true,
},
build: {
inlineStylesheets: 'auto',
},
integrations: [
icon(),
mdx({
extendMarkdownConfig: true,
}),
tailwind({
applyBaseStyles: false,
}),
vue(),
preact({
compat: true,
}),
prefetch(),
sitemap(),
robotsTxt(),
// Critters is disabled because it doesn't support some selectors used by Tailwind
critters({ Critters: false && { pruneSource: true } }),
],
vite: {
plugins: [vitePreact(), tsconfigPaths({ verbose: true })],
},
markdown: {
gfm: true,
remarkPlugins: [remarkReadingTime],
rehypePlugins: [
rehypeSlug,
[autolinkHeadings, autolinkConfig],
[
rehypeExternalLinks,
{
target: '_blank',
rel: 'noreferrer',
},
],
],
shikiConfig: {
theme: 'monokai',
},
},
})