diff --git a/src/pages/en/migrate.md b/src/pages/en/migrate.md index e894647778fd1..e4a90ea850e6c 100644 --- a/src/pages/en/migrate.md +++ b/src/pages/en/migrate.md @@ -80,6 +80,18 @@ We love to find sensible defaults that "just work" out-of-the-box. As part of th Check our new [syntax highlighting docs](/en/guides/markdown-content/#syntax-highlighting) for full details. **If you prefer to keep Prism as your syntax highlighter,** [set the `syntaxHighlight` option to `'prism'`](/en/guides/markdown-content/#prism-configuration) in your project's markdown configuration. +#### The `` component has a new home + +As part of our mission to keep Astro core as lean as possible, we've moved the built-in `Prism` component out of `astro/components` and into the `@astrojs/prism` package. You can now import this component from `@astrojs/prism/component` like so: + +```astro +--- +import Prism from '@astrojs/prism/component'; +--- +``` + +Since the `@astrojs/prism` package is still bundled with `astro` core, you won't need to install anything new, nor add Prism as an integration! However, note that we _do_ plan to extract `@astrojs/prism` (and Prism syntax highlighting in general) to a separate, installable package in the future. See [the `` component API reference](/en/reference/api-reference#prism-) for more. + ### CSS Parser Upgrade Our internal CSS parser has been updated, and comes with better support for advanced CSS syntax, like container queries. This should be a mostly invisible change for most users, but hopefully for advanced users will enjoy the new CSS feature support. diff --git a/src/pages/en/reference/api-reference.md b/src/pages/en/reference/api-reference.md index 1c09968e5f953..dd1372a6f83f7 100644 --- a/src/pages/en/reference/api-reference.md +++ b/src/pages/en/reference/api-reference.md @@ -366,11 +366,13 @@ This component provides syntax highlighting for code blocks at build time (no cl ```astro --- -import { Prism } from 'astro/components'; +import Prism from '@astrojs/prism/component'; --- ``` +> **`@astrojs/prism`** is built-in as part of the `astro` package. No need to install as a separate dependency just yet! However, note that we do plan to extract `@astrojs/prism` to a separate, installable package in the future. + This component provides language-specific syntax highlighting for code blocks by applying Prism's CSS classes. Note that **you need to provide a Prism CSS stylesheet** (or bring your own) for syntax highlighting to appear! See the [Prism configuration section](/en/guides/markdown-content#prism-configuration) for more details. See the [list of languages supported by Prism](https://prismjs.com/#supported-languages) where you can find a language’s corresponding alias. And, you can also display your Astro code blocks with `lang="astro"`! diff --git a/src/pages/es/reference/builtin-components.md b/src/pages/es/reference/builtin-components.md index 356a7d5f99ee2..b1c2ffd522de3 100644 --- a/src/pages/es/reference/builtin-components.md +++ b/src/pages/es/reference/builtin-components.md @@ -42,7 +42,7 @@ Mira nuestra [Guía de Markdown](/es/guides/markdown-content) para más informac ```astro --- -import { Prism } from 'astro/components'; +import Prism from '@astrojs/prism/component'; --- ```