Skip to content

Commit

Permalink
Deprecating the "Authoring markdown" section and adding config docs f…
Browse files Browse the repository at this point in the history
…or the new legacy flag (#1090)

* Updating docs for the new legacy markdown flag

* linter fix for canonical links to MDX

* Update src/pages/en/guides/markdown-content.md

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

* removing the config reference since it's auto-generated 🎉

* adding back the existing markdown.mode config reference

* Adding a migration guide for the legacy flag

* Update src/pages/en/migrate.md

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

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
  • Loading branch information
Tony Sullivan and sarah11918 authored Jul 25, 2022
1 parent d54b192 commit a5c7e1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/pages/en/guides/markdown-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ You can also pass the `--drafts` flag when running `astro build` to build draft

## Authoring Markdown

:::caution[Deprecated]
Astro no longer supports components or JSX in Markdown pages by default and may be removed in a future release. In the meantime, Astro config supports a [legacy flag](/en/reference/configuration-reference/#legacyastroflavoredmarkdown) that will enable these features in Markdown pages until you are able to migrate to [`@astrojs/mdx`](/en/guides/integrations-guide/mdx/).
:::

In addition to supporting standard Markdown syntax, Astro also extends Markdown to make your content even more expressive. Below are some Markdown features that only exist in Astro.

### Using Variables in Markdown
Expand Down
8 changes: 7 additions & 1 deletion src/pages/en/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Astro v1.0 RC has upgraded from Vite 2 to [Vite 3](https://vitejs.dev/). We've h

### Deprecated: `Astro.canonicalURL`

You can now use the new [`Astro.url`](/en/reference/api-reference/#astrourl) helper to construct your own canonical URL from the current page/request URL.
You can now use the new [`Astro.url`](/en/reference/api-reference/#astrourl) helper to construct your own canonical URL from the current page/request URL.

```js
// Before:
Expand All @@ -36,6 +36,12 @@ const canonicalURL = Astro.canonicalURL;
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
```

### Deprecated: Components and JSX in Markdown

Astro no longer supports components or JSX expressions in Markdown pages by default. For long-term support you should migrate to the [`@astrojs/mdx`](/en/guides/integrations-guide/mdx/) integration.

To make migrating easier, a new [legacy flag](/en/reference/configuration-reference/#legacyastroflavoredmarkdown) can be used to re-enable previous Markdown features.

## Migrate to v1.0.0-beta

On April 4, 2022 we released the Astro 1.0 Beta! 🎉
Expand Down

0 comments on commit a5c7e1e

Please sign in to comment.