2023-05-24 20:52:22 +00:00
|
|
|
---
|
|
|
|
'@astrojs/markdoc': patch
|
|
|
|
---
|
|
|
|
|
2023-05-25 15:35:07 +00:00
|
|
|
Add support for syntax highlighting with Shiki. Apply to your Markdoc config using the `extends` property:
|
2023-05-24 20:52:22 +00:00
|
|
|
|
|
|
|
```js
|
|
|
|
// markdoc.config.mjs
|
2023-05-25 15:35:07 +00:00
|
|
|
import { defineMarkdocConfig } from '@astrojs/markdoc/config';
|
|
|
|
import shiki from '@astrojs/markdoc/shiki';
|
|
|
|
|
2023-05-24 20:52:22 +00:00
|
|
|
export default defineMarkdocConfig({
|
|
|
|
extends: [
|
2023-05-25 15:35:07 +00:00
|
|
|
shiki({ /** Shiki config options */ }),
|
2023-05-24 20:52:22 +00:00
|
|
|
],
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
Learn more in the [`@astrojs/markdoc` README.](https://docs.astro.build/en/guides/integrations-guide/markdoc/#syntax-highlighting)
|