-
Notifications
You must be signed in to change notification settings - Fork 5
/
astro.config.ts
50 lines (48 loc) · 1.2 KB
/
astro.config.ts
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 markdoc from "@astrojs/markdoc";
import tailwind from "@astrojs/tailwind";
import expressiveCode from "astro-expressive-code";
import { defineConfig } from "astro/config";
import { rename } from "node:fs/promises";
import db from "@astrojs/db";
// https://astro.build/config
export default defineConfig({
publicDir: "./static",
site: "https://erika.florist/",
image: {
service: {
entrypoint: "./src/imageService.ts",
},
},
prefetch: {
prefetchAll: true,
},
integrations: [
tailwind({
applyBaseStyles: false,
}),
expressiveCode(),
markdoc({
allowHTML: true,
}),
// HACK: Could be nicer with https://github.com/withastro/roadmap/discussions/643
// ... but could be even nicer with a way to render Markdoc directly in an endpoint, ha.
{
name: "RSS Generator",
hooks: {
"astro:build:done": async (options) => {
const rssPages = options.pages.filter((page) => page.pathname.includes("rss"));
for (const { pathname: rssPage } of rssPages) {
await rename(
new URL(`${rssPage}index.html`, options.dir),
new URL(`${rssPage}index.xml`, options.dir),
);
}
},
},
},
db(),
],
experimental: {
contentIntellisense: true,
},
});