React integration config

This commit is contained in:
2023-11-28 03:29:11 -06:00
parent 4ebdb779e3
commit 57ed2a4e52
2 changed files with 25 additions and 13 deletions

View File

@@ -7,12 +7,13 @@ import rehypePrettyCode from "rehype-pretty-code";
import mdx from "@astrojs/mdx";
/** @type {import('rehype-pretty-code').Options} */
import react from "@astrojs/react";
const prettyOptions = {
theme: "github-dark",
keepBackground: false,
tokensMap: {
fn: "entity.name.function",
},
fn: "entity.name.function"
}
// getHighlighter: (options) => getHighlighter({
// ...options,
// langs: [
@@ -26,13 +27,14 @@ const prettyOptions = {
// }),
};
// https://astro.build/config
export default defineConfig({
site: "https://undefined.behavio.rs",
prefetch: true,
integrations: [tailwind(), sitemap(), robotsTxt(), mdx()],
integrations: [tailwind(), sitemap(), robotsTxt(), mdx(), react()],
markdown: {
syntaxHighlight: false,
rehypePlugins: [[rehypePrettyCode, prettyOptions]],
},
});
rehypePlugins: [[rehypePrettyCode, prettyOptions]]
}
});

View File

@@ -1,12 +1,22 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"baseUrl": ".",
"baseUrl": "/home/xevion/projects/undefined.behavio.rs",
"paths": {
"@styles/*": ["src/styles/*"],
"@layouts/*": ["src/layouts/*"],
"@posts/*": ["src/pages/posts/*"],
"@components/*": ["src/components/*"]
}
"@styles/*": [
"src/styles/*"
],
"@layouts/*": [
"src/layouts/*"
],
"@posts/*": [
"src/pages/posts/*"
],
"@components/*": [
"src/components/*"
]
},
"jsx": "react-jsx",
"jsxImportSource": "react"
}
}
}