0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/examples
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
..
basics [ci] release (#3939) 2022-07-18 21:54:25 -07:00
blog [ci] format 2022-07-21 17:48:45 +00:00
blog-multiple-authors [ci] format 2022-07-21 17:48:45 +00:00
component [ci] format 2022-07-19 05:21:24 +00:00
docs [ci] format 2022-07-21 17:48:45 +00:00
env-vars [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-alpine [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-lit [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-multiple [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-preact [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-react [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-solid [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-svelte [ci] release (#3939) 2022-07-18 21:54:25 -07:00
framework-vue [ci] release (#3939) 2022-07-18 21:54:25 -07:00
integrations-playground [ci] release (#3939) 2022-07-18 21:54:25 -07:00
minimal [ci] release (#3939) 2022-07-18 21:54:25 -07:00
non-html-pages [ci] release (#3939) 2022-07-18 21:54:25 -07:00
portfolio [ci] release (#3939) 2022-07-18 21:54:25 -07:00
ssr [ci] release (#3939) 2022-07-18 21:54:25 -07:00
starter [ci] release (#3939) 2022-07-18 21:54:25 -07:00
subpath [ci] release (#3939) 2022-07-18 21:54:25 -07:00
with-markdown-plugins Move the Markdown component to its own package (#3986) 2022-07-20 16:45:05 -04:00
with-markdown-shiki Move the Markdown component to its own package (#3986) 2022-07-20 16:45:05 -04:00
with-mdx [MDX] Add Prism and Shiki support (#4002) 2022-07-21 16:43:58 -04:00
with-nanostores [ci] release (#3939) 2022-07-18 21:54:25 -07:00
with-tailwindcss [ci] release (#3939) 2022-07-18 21:54:25 -07:00
with-vite-plugin-pwa [ci] release (#3939) 2022-07-18 21:54:25 -07:00
README.md

Astro Examples Library

The easiest way to check out one of these examples on your machine is by running this command in an empty directory:

npm init astro -- --template [EXAMPLE_NAME]

Community Examples

Visit awesome-astro for a full list of community examples. You can use npm init astro to check out any community examples:

npm init astro -- --template [GITHUB_USER]/[REPO_NAME]

Paths to examples nested inside of a repo are also supported:

npm init astro -- --template [GITHUB_USER]/[REPO_NAME]/path/to/example