barrettruth.com/astro.config.mjs
2026-01-07 13:43:40 -06:00

74 lines
1.4 KiB
JavaScript

import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import rehypeExternalLinks from "rehype-external-links";
import rehypeKatex from "rehype-katex";
import remarkMath from "remark-math";
import path from "path";
const daylight = {
name: "daylight",
type: "light",
colors: {
"editor.background": "#f5f5f5",
"editor.foreground": "#1a1a1a",
},
tokenColors: [
{
scope: [
"storage.type",
"storage.modifier",
"keyword.control",
"keyword.operator.new",
],
settings: { foreground: "#3b5bdb" },
},
{
scope: [
"string",
"constant",
"constant.numeric",
"constant.language",
"constant.character",
"number",
],
settings: { foreground: "#2d7f3e" },
},
],
};
export default defineConfig({
build: {
format: "file",
},
integrations: [
mdx({
remarkPlugins: [remarkMath],
rehypePlugins: [
rehypeKatex,
[
rehypeExternalLinks,
{
target: "_blank",
rel: ["noopener", "noreferrer"],
},
],
],
}),
],
vite: {
resolve: {
alias: {
"@components": path.resolve(".", "src/components"),
},
},
},
markdown: {
shikiConfig: {
themes: {
light: daylight,
},
langs: [],
wrap: true,
},
},
});