Configure syntax highlighting

This commit is contained in:
Maciej Jur 2023-04-08 16:11:36 +02:00
parent ffaf587c3e
commit df99ead67a
2 changed files with 6 additions and 3 deletions

View file

@ -11,6 +11,9 @@ export default defineConfig({
], ],
rehypePlugins: [ rehypePlugins: [
[rehypeKatex, {output: 'mathml'}] [rehypeKatex, {output: 'mathml'}]
] ],
shikiConfig: {
theme: 'min-light'
}
} }
}); });

View file

@ -8,8 +8,8 @@ export async function getStaticPaths () {
} }
const { entry } = Astro.props; const { entry } = Astro.props;
const { Content } = await entry.render(); const { Content, headings } = await entry.render();
--- ---
<Article frontmatter={entry.data}> <Article frontmatter={entry.data} headings={headings}>
<Content /> <Content />
</Article> </Article>