forked from ddev/ddev.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
64 lines (63 loc) · 1.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { defineConfig } from "astro/config"
import { plainTextPlugin } from "@barnabask/astro-minisearch"
import { remarkReadingTime } from "./src/lib/remark-reading-time.mjs"
import prefetch from "@astrojs/prefetch"
import react from "@astrojs/react"
import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links";
import robotsTxt from "astro-robots-txt"
import searchIndex from "./src/lib/search-index.js"
import sitemap from "@astrojs/sitemap"
import tailwind from "@astrojs/tailwind"
import widont from "rehype-widont"
// https://astro.build/config
export default defineConfig({
site: "https://ddev.com",
vite: {
server: {
host: true, // leave this unchanged for DDEV!
}},
integrations: [
tailwind(),
react(),
sitemap({
serialize(item) {
if (
item.url.endsWith(".json/") ||
item.url.endsWith(".svg/") ||
item.url.endsWith(".xml/")
) {
// Don’t index sitemaps or generated SVG, which come with `/` route endings here
return undefined
}
return item
},
}),
robotsTxt({
sitemap: true,
}),
searchIndex({
output: "search.json",
}),
prefetch(),
],
markdown: {
syntaxHighlight: "shiki",
// https://github.com/shikijs/shiki/blob/main/docs/languages.md
shikiConfig: {
theme: "nord",
},
remarkPlugins: [remarkReadingTime],
rehypePlugins: [
widont,
plainTextPlugin({
contentKey: "plainText",
removeEmoji: false,
headingTags: ["h2", "h3"],
}),
rehypeAstroRelativeMarkdownLinks,
],
},
image: {
domains: ["avatars.githubusercontent.com"],
},
})