-
Notifications
You must be signed in to change notification settings - Fork 23
/
astro.config.mjs
47 lines (45 loc) · 1.41 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
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';
import { remarkReadingTime } from './src/utils/readingTime';
import rehypePrettyCode from 'rehype-pretty-code';
import vercelStatic from '@astrojs/vercel/static';
import react from '@astrojs/react';
import sitemap from "@astrojs/sitemap";
const options = {
// Specify the theme to use or a custom theme json, in our case
// it will be a moonlight-II theme from
// https://github.com/atomiks/moonlight-vscode-theme/blob/master/src/moonlight-ii.json
// Callbacks to customize the output of the nodes
//theme: json,
onVisitLine(node) {
// Prevent lines from collapsing in `display: grid` mode, and
// allow empty lines to be copy/pasted
if (node.children.length === 0) {
node.children = [{
type: 'text',
value: ' '
}];
}
},
onVisitHighlightedLine(node) {
// Adding a class to the highlighted line
node.properties.className = ['highlighted'];
}
};
// https://astro.build/config
export default defineConfig({
site: 'https://astro-tech-blog-ten.vercel.app/',
markdown: {
syntaxHighlight: false,
// Disable syntax built-in syntax hightlighting from astro
rehypePlugins: [[rehypePrettyCode, options]],
remarkPlugins: [remarkReadingTime]
},
integrations: [tailwind(), react(), sitemap()],
output: 'static',
adapter: vercelStatic({
webAnalytics: {
enabled: true
}
})
});