mirror of
https://github.com/Xevion/undefined.behavio.rs.git
synced 2025-12-06 01:16:46 -06:00
React integration config
This commit is contained in:
@@ -7,12 +7,13 @@ import rehypePrettyCode from "rehype-pretty-code";
|
|||||||
import mdx from "@astrojs/mdx";
|
import mdx from "@astrojs/mdx";
|
||||||
|
|
||||||
/** @type {import('rehype-pretty-code').Options} */
|
/** @type {import('rehype-pretty-code').Options} */
|
||||||
|
import react from "@astrojs/react";
|
||||||
const prettyOptions = {
|
const prettyOptions = {
|
||||||
theme: "github-dark",
|
theme: "github-dark",
|
||||||
keepBackground: false,
|
keepBackground: false,
|
||||||
tokensMap: {
|
tokensMap: {
|
||||||
fn: "entity.name.function",
|
fn: "entity.name.function"
|
||||||
},
|
}
|
||||||
// getHighlighter: (options) => getHighlighter({
|
// getHighlighter: (options) => getHighlighter({
|
||||||
// ...options,
|
// ...options,
|
||||||
// langs: [
|
// langs: [
|
||||||
@@ -26,13 +27,14 @@ const prettyOptions = {
|
|||||||
// }),
|
// }),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: "https://undefined.behavio.rs",
|
site: "https://undefined.behavio.rs",
|
||||||
prefetch: true,
|
prefetch: true,
|
||||||
integrations: [tailwind(), sitemap(), robotsTxt(), mdx()],
|
integrations: [tailwind(), sitemap(), robotsTxt(), mdx(), react()],
|
||||||
markdown: {
|
markdown: {
|
||||||
syntaxHighlight: false,
|
syntaxHighlight: false,
|
||||||
rehypePlugins: [[rehypePrettyCode, prettyOptions]],
|
rehypePlugins: [[rehypePrettyCode, prettyOptions]]
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
@@ -1,12 +1,22 @@
|
|||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"baseUrl": "/home/xevion/projects/undefined.behavio.rs",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@styles/*": ["src/styles/*"],
|
"@styles/*": [
|
||||||
"@layouts/*": ["src/layouts/*"],
|
"src/styles/*"
|
||||||
"@posts/*": ["src/pages/posts/*"],
|
],
|
||||||
"@components/*": ["src/components/*"]
|
"@layouts/*": [
|
||||||
}
|
"src/layouts/*"
|
||||||
|
],
|
||||||
|
"@posts/*": [
|
||||||
|
"src/pages/posts/*"
|
||||||
|
],
|
||||||
|
"@components/*": [
|
||||||
|
"src/components/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"jsxImportSource": "react"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user