-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
48 lines (45 loc) · 1.19 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
import { defineConfig } from 'astro/config';
import preact from '@astrojs/preact';
import mdx from "@astrojs/mdx";
import image from '@astrojs/image';
import solid from "@astrojs/solid-js";
import compress from "astro-compress";
import sitemap from '@astrojs/sitemap';
import robotsTxt from 'astro-robots-txt';
import netlify from '@astrojs/netlify/functions';
import getReadingTime from "reading-time";
import { toString } from "mdast-util-to-string";
export default defineConfig({
site: "https://blackskies.netlify.app/",
integrations: [
sitemap(),
robotsTxt(),
solid(),
preact(),
mdx({
remarkPlugins: {
// extends: [remarkReadingTime],
}
}),
image(),
compress()],
markdown: {
draft: true,
syntaxHighlight: 'shiki',
shikiConfig: {
theme: 'dracula',
wrap: true,
langs: []
}
},
output: 'server',
adapter: netlify(),
});
// function remarkReadingTime() {
// // adds a reading time to all mdx files
// return function (tree, file) {
// const textOnPage = toString(tree);
// const readingTime = getReadingTime(textOnPage);
// file.data.astro.frontmatter.minutesRead = readingTime.text;
// };
// }