2025-10-06 12:54:47 +00:00
|
|
|
import mdx from "@astrojs/mdx";
|
|
|
|
|
import react from "@astrojs/react";
|
|
|
|
|
import sitemap from "@astrojs/sitemap";
|
|
|
|
|
import tailwind from "@astrojs/tailwind";
|
|
|
|
|
import AutoImport from "astro-auto-import";
|
|
|
|
|
import { defineConfig } from "astro/config";
|
|
|
|
|
import remarkCollapse from "remark-collapse";
|
|
|
|
|
import remarkToc from "remark-toc";
|
|
|
|
|
import rehypeKatex from "rehype-katex";
|
|
|
|
|
import remarkMath from "remark-math";
|
|
|
|
|
import cloudflare from "@astrojs/cloudflare";
|
|
|
|
|
|
|
|
|
|
// https://astro.build/config
|
|
|
|
|
export default defineConfig({
|
2025-10-06 13:31:48 +00:00
|
|
|
site: "https://yourusername.github.io",
|
2025-10-06 13:41:58 +00:00
|
|
|
base: "/",
|
2025-10-06 12:54:47 +00:00
|
|
|
trailingSlash: "ignore",
|
|
|
|
|
prefetch: {
|
|
|
|
|
prefetchAll: true
|
|
|
|
|
},
|
|
|
|
|
adapter: cloudflare(),
|
|
|
|
|
integrations: [react(), sitemap(), tailwind({
|
|
|
|
|
config: {
|
|
|
|
|
applyBaseStyles: false
|
|
|
|
|
}
|
|
|
|
|
}), AutoImport({
|
|
|
|
|
imports: ["@components/common/Button.astro", "@shortcodes/Accordion", "@shortcodes/Notice", "@shortcodes/Youtube", "@shortcodes/Tabs", "@shortcodes/Tab"]
|
|
|
|
|
}), mdx()],
|
|
|
|
|
markdown: {
|
|
|
|
|
remarkPlugins: [remarkToc, [remarkCollapse, {
|
|
|
|
|
test: "Table of contents"
|
|
|
|
|
}], remarkMath],
|
|
|
|
|
rehypePlugins: [[rehypeKatex, {}]],
|
|
|
|
|
shikiConfig: {
|
|
|
|
|
themes: { // https://shiki.style/themes
|
|
|
|
|
light: "light-plus",
|
|
|
|
|
dark: "dark-plus",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
extendDefaultPlugins: true
|
|
|
|
|
},
|
|
|
|
|
});
|