blog/astro.config.mjs

39 lines
864 B
JavaScript
Raw Normal View History

2025-04-11 21:50:48 +08:00
import { defineConfig } from "astro/config";
import solidJs from "@astrojs/solid-js";
import mdx from "@astrojs/mdx";
import icon from "astro-icon";
import paths from "node:path"
import rehypeBuckTable from "~/support/rehype-buck-tables";
// https://astro.build/config
export default defineConfig({
integrations: [solidJs(), mdx(), icon(), {
name: "inject-cloudflare-headers",
"hooks": {
"astro:config:setup": ({injectRoute}) => {
injectRoute({
pattern: "/_headers",
entrypoint: "./src/pages/_headers.ts",
})
}
}
}
],
markdown: {
rehypePlugins: [rehypeBuckTable],
shikiConfig: {
themes: {
light: "github-light",
dark: "github-dark",
}
}
},
vite: {
resolve: {
alias: {
"~": paths.resolve(import.meta.dir, "src")
}
}
}
});