mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
* chore: remove unused util * chore: changeset * deps: shiki * wip: first stab at shiki markdoc config * feat: get shiki working! * refactor: return HTML string directly from transform * chore: move shiki to markdoc dev dep * refactor: use async cache with clear docs on why * test: transform units with Shiki config options * refactor: switch to `extends` model * refactor: nodes/ -> extensions/ * feat: raise friendly error for Promise extensions * docs: README * chore: lint * chore: dead file * chore: lowercase for fuzzy find please * fix: bad ctx spread * chore: clean up cache, add shiki imp error * chore: add shiki to optional peer deps * chore: hoist those consts * docs: more explicit "install shiki now please" Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * oops bad find and replace * chore: update changeset * nit: period haunts me --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
17 lines
539 B
Markdown
17 lines
539 B
Markdown
---
|
|
'@astrojs/markdoc': patch
|
|
---
|
|
|
|
Add support for syntax highlighting with Shiki. Install `shiki` in your project with `npm i shiki`, and apply to your Markdoc config using the `extends` option:
|
|
|
|
```js
|
|
// markdoc.config.mjs
|
|
import { defineMarkdocConfig, shiki } from '@astrojs/markdoc/config';
|
|
export default defineMarkdocConfig({
|
|
extends: [
|
|
await shiki({ /** Shiki config options */ }),
|
|
],
|
|
})
|
|
```
|
|
|
|
Learn more in the [`@astrojs/markdoc` README.](https://docs.astro.build/en/guides/integrations-guide/markdoc/#syntax-highlighting)
|