-
Notifications
You must be signed in to change notification settings - Fork 146
/
astro.config.mjs
50 lines (47 loc) · 1.51 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 mdx from '@astrojs/mdx';
import solidJs from '@astrojs/solid-js';
import tailwind from '@astrojs/tailwind';
import compress from 'astro-compress';
import icon from 'astro-icon';
// @ts-check
import { defineConfig } from 'astro/config';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkCustomHeadingId from 'remark-custom-heading-id';
import { rehypeCodemirrorPlugin } from './src/util/rehypeCodemirrorPlugin.mjs';
import { rehypeCopyCodePlugin } from './src/util/rehypeCopyCodePlugin.mjs';
import { autolinkConfig } from './src/util/rehypeHeadingsConfig';
import { rehypeNotesPlugin } from './src/util/rehypeNotesPlugin.mjs';
import sitemap from '@astrojs/sitemap';
const deployDomain = process.env.DEPLOY_DOMAIN ?? 'surrealdb.com';
const site = `https://${deployDomain}`;
// https://astro.build/config
export default defineConfig({
site,
base: '/docs',
outDir: './dist/docs',
trailingSlash: 'never',
integrations: [
mdx(),
solidJs({ devtools: true }),
icon(),
tailwind({
nesting: true,
}),
compress({
Image: false,
}),
sitemap(),
],
markdown: {
remarkPlugins: [remarkCustomHeadingId],
rehypePlugins: [
rehypeCodemirrorPlugin,
rehypeNotesPlugin,
rehypeSlug,
[rehypeAutolinkHeadings, autolinkConfig],
rehypeCopyCodePlugin,
],
syntaxHighlight: false,
},
});