0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/examples/with-mdx
Ben Holmes 3b8a744524
[MDX] Add Prism and Shiki support (#4002)
* deps: add rehype-prism, shiki, rehype-pretty-code

* wip: apply rehype plugins depending on config

* wip: cherry-pick jsx-runtime fix?

* deps: rehype-pretty-code -> shiki-twoslash, add rehype-raw

* wip: add jsx-runtime fix

* feat: get shiki working!

* deps: add @astrojs/prism, prismjs, unist-util-visit

* feat: add prism support

* example: add small syntax highlight demo to with-mdx

* deps: remove rehype-prism

* chore: remove unused async

* chore: add .test.js to all mdx tests

* test: shiki, shikiConfig, prism

* fix: remove "is:raw" from prism output

* docs: add syntax highlighting section

* chore: add changeset

* nit: "Shiki config" -> Shiki config

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Revert "wip: add jsx-runtime fix"

This reverts commit 07f4528f44.

* docs: link to integration README from example

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-07-21 16:43:58 -04:00
..
.vscode [ci] format 2022-07-01 20:53:13 +00:00
public MDX support (#3706) 2022-06-30 13:09:09 -05:00
src [MDX] Add Prism and Shiki support (#4002) 2022-07-21 16:43:58 -04:00
.gitignore MDX support (#3706) 2022-06-30 13:09:09 -05:00
.npmrc MDX support (#3706) 2022-06-30 13:09:09 -05:00
.stackblitzrc MDX support (#3706) 2022-06-30 13:09:09 -05:00
astro.config.mjs [ci] format 2022-06-30 18:11:12 +00:00
package.json [ci] release (#3939) 2022-07-18 21:54:25 -07:00
README.md MDX support (#3706) 2022-06-30 13:09:09 -05:00
sandbox.config.json MDX support (#3706) 2022-06-30 13:09:09 -05:00
tsconfig.json Move client types into Astro (#3851) 2022-07-11 08:12:18 -04:00

Astro Example: MDX

npm init astro -- --template with-mdx

Open in StackBlitz

This example showcases using @astrojs/mdx to author content using MDX.