diff --git a/src/pages/en/guides/markdown-content.md b/src/pages/en/guides/markdown-content.md index 87d84401ebe75..04a800e9c0328 100644 --- a/src/pages/en/guides/markdown-content.md +++ b/src/pages/en/guides/markdown-content.md @@ -345,93 +345,6 @@ const { Content } = Astro.props.post ``` -## Markdown Component - -:::caution[Deprecated] -The `` component does not work in SSR and will be moved to its own package before v1.0. Consider [importing Markdown content](/en/guides/markdown-content/#importing-markdown) instead. -::: - -You can import the [built-in Astro Markdown component](/en/reference/api-reference/#markdown-) in your component script and then write any Markdown you want between `` tags. - -````astro ---- -import { Markdown } from 'astro/components'; -import Layout from '../layouts/Layout.astro'; - -const expressions = 'Lorem ipsum'; ---- - - - # Hello world! - - **Everything** supported in a `.md` file is also supported here! - - There is _zero_ runtime overhead. - - In addition, Astro supports: - - Astro {expressions} - - Automatic indentation normalization - - Automatic escaping of expressions inside code blocks - - ```js - // This content is not transformed! - const object = { someOtherValue }; - ``` - - - Rich component support like any `.astro` file! - - Recursive Markdown support (Component children are also processed as Markdown) - - -```` - -### Remote Markdown - -:::caution[Deprecated] -The `` component does not work in SSR and will be moved to its own package before v1.0. Consider [importing Markdown content](/en/guides/markdown-content/#importing-markdown) instead. -::: - -If you have Markdown in a remote source, you may pass it directly to the Markdown component through the `content` attribute. - -```astro ---- -import { Markdown } from 'astro/components'; - -const content = await fetch('https://raw.githubusercontent.com/withastro/docs/main/README.md').then(res => res.text()); ---- - - - -``` - -### Nested Markdown - -:::caution[Deprecated] -The `` component does not work in SSR and will be moved to its own package before v1.0. Consider [importing Markdown content](/en/guides/markdown-content/#importing-markdown) instead. -::: - -`` components can be nested. - -```astro ---- -import { Markdown } from 'astro/components'; - -const content = await fetch('https://raw.githubusercontent.com/withastro/docs/main/README.md').then(res => res.text()); ---- - - - - ## Markdown example - - Here we have some __Markdown__ code. We can also dynamically render remote content. - - - - -``` - -:::caution -Use of the `Markdown` component to render remote Markdown can open you up to a [cross-site scripting (XSS)](https://en.wikipedia.org/wiki/Cross-site_scripting) attack. If you are rendering untrusted content, be sure to _sanitize your content **before** rendering it_. -::: ## Configuring Markdown @@ -491,7 +404,7 @@ By default, Astro comes with [GitHub-flavored Markdown](https://github.com/remar Astro comes with built-in support for [Shiki](https://shiki.matsu.io/) and [Prism](https://prismjs.com/). This provides instant syntax highlighting for: -- all code fences (\`\`\`) used in a markdown (`.md`) file and the [built-in `` component](#markdown-component). +- all code fences (\`\`\`) used in a markdown (`.md`) file. - content within the [built-in `` component](/en/reference/api-reference/#code-) (powered by Shiki), or the [`` component](/en/reference/api-reference/#prism-) (powered by Prism). Shiki is enabled by default, preconfigured with the `github-dark` theme. The compiled output will be limited to inline `style`s without any extraneous CSS classes, stylesheets, or client-side JS. diff --git a/src/pages/en/migrate.md b/src/pages/en/migrate.md index e66ff9c1fbbe9..0af1a920bcc39 100644 --- a/src/pages/en/migrate.md +++ b/src/pages/en/migrate.md @@ -42,6 +42,14 @@ Astro no longer supports components or JSX expressions in Markdown pages by defa To make migrating easier, a new [legacy flag](/en/reference/configuration-reference/#legacyastroflavoredmarkdown) can be used to re-enable previous Markdown features. +### `` Component Removed + +Astro's built-in `` component has been moved to a separate package. To continue using this component, you will now need to install `@astrojs/markdown` and update your imports accordingly. For more details, see [the `@astrojs/markdown` README](https://github.com/withastro/astro/tree/main/packages/markdown/component). + +:::tip +Astro now has support for [MDX](https://mdxjs.com/) through our [MDX integration](https://github.com/withastro/astro/tree/main/packages/integrations/mdx). MDX gives you the ability to include both Markdown and imported components in the same file. MDX can be good alternative for the `` component due to its large community and stable APIs. +::: + ## Migrate to v1.0.0-beta On April 4, 2022 we released the Astro 1.0 Beta! 🎉 diff --git a/src/pages/en/reference/api-reference.md b/src/pages/en/reference/api-reference.md index 7133c6af9e171..8b3e5b36b60c6 100644 --- a/src/pages/en/reference/api-reference.md +++ b/src/pages/en/reference/api-reference.md @@ -436,22 +436,7 @@ Astro includes several built-in components for you to use in your projects. All ### `` -:::caution[Deprecated] -The `` component does not work in SSR and will be moved to its own package before v1.0. Consider [importing Markdown content](/en/guides/markdown-content/#importing-markdown) instead. -::: - -```astro ---- -import { Markdown } from 'astro/components'; ---- - - # Markdown syntax is now supported! **Yay!** - -``` - -See our [Markdown Guide](/en/guides/markdown-content/) for more info. - - +The Markdown component is no longer built into Astro. ### `` diff --git a/src/pages/en/reference/directives-reference.md b/src/pages/en/reference/directives-reference.md index 0886f6f1b42e2..f79107a12d18f 100644 --- a/src/pages/en/reference/directives-reference.md +++ b/src/pages/en/reference/directives-reference.md @@ -221,8 +221,6 @@ Using `define:vars` on a `