-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
35 lines (30 loc) · 1.11 KB
/
Copy pathastro.config.mjs
File metadata and controls
35 lines (30 loc) · 1.11 KB
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
// @ts-check
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import { defineConfig } from "astro/config";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import rehypeVideoEmbed from "./src/utils/rehype-video-embed.mjs";
import rehypeTableScroll from "./src/utils/rehype-table-scroll.mjs";
import rehypeCallout from "./src/utils/rehype-callout.mjs";
import { localizeAvatars } from "./src/utils/localize-avatars";
// Download + cache friend avatars to public/avatars/ before pages render, on
// any build path (local / Vercel / CI), so visitors load them from this origin
// instead of ~24 third-party hosts.
const localizeAvatarsIntegration = {
name: "localize-avatars",
hooks: {
"astro:build:start": async () => {
await localizeAvatars();
},
},
};
// https://astro.build/config
export default defineConfig({
site: "https://www.neomelt.cloud/",
integrations: [mdx(), sitemap(), localizeAvatarsIntegration],
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex, rehypeVideoEmbed, rehypeTableScroll, rehypeCallout],
},
});