forked from mswjs/mswjs.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
50 lines (46 loc) · 1.29 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
import { defineConfig } from 'astro/config'
import mdx from '@astrojs/mdx'
import sitemap from '@astrojs/sitemap'
import react from '@astrojs/react'
import { rehypeHeadingIds } from '@astrojs/markdown-remark'
import rehypePrettyCode from 'rehype-pretty-code'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypeExternalLinks from 'rehype-external-links'
import { remarkLastModifiedPlugin } from './src/plugins/remarkLastModifiedPlugin'
import tailwind from '@astrojs/tailwind'
/** @type {import('rehype-autolink-headings').Options} */
const autoLinkHeadingsOptions = {
behavior: 'wrap',
}
/** @type {import('rehype-external-links').Options} */
const externalLinksOptions = {
target: '_blank',
rel: ['noopener', 'noreferrer'],
}
// https://astro.build/config
export default defineConfig({
site: 'https://mswjs.io',
integrations: [
mdx(),
sitemap(),
react(),
tailwind({
applyBaseStyles: false,
}),
],
markdown: {
syntaxHighlight: false,
remarkPlugins: [remarkLastModifiedPlugin],
rehypePlugins: [
rehypeHeadingIds,
[rehypeExternalLinks, externalLinksOptions],
[rehypeAutolinkHeadings, autoLinkHeadingsOptions],
[
rehypePrettyCode,
{
theme: 'github-dark',
},
],
],
},
})