0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

docs: add section on .mdx file support in VS Code (#4694)

* docs: add section on .mdx file support in VS Code

* Update packages/integrations/mdx/README.md

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
This commit is contained in:
Lloyd Atkinson 2022-09-09 18:13:09 +01:00 committed by GitHub
parent 64f11c4cee
commit eb4f6faee6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,6 +57,18 @@ export default defineConfig({
});
```
Finally, restart the dev server.
### Editor Integration
[VS Code](https://code.visualstudio.com/) supports Markdown by default. However, for MDX editor support, you may wish to add the following setting in your VSCode config. This ensures authoring MDX files provides a Markdown-like editor experience.
```json title=".vscode/settings.json"
"files.associations": {
"*.mdx": "markdown"
}
```
## Usage
You can [add MDX pages to your project](https://docs.astro.build/en/guides/markdown-content/#markdown-and-mdx-pages) by adding `.mdx` files within your `src/pages/` directory.