fix: add TypeScript type and documentation for markdown "mode" config (#3883)

* fix: add TypeScript type and documentation for markdown "mode" config

* chore: add changeset
This commit is contained in:
Corbin Crutchley 2022-07-12 06:07:51 -07:00 committed by GitHub
parent c4f6fdf372
commit b4cb4a40df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Added "mode" to Astro config file TypeScript definitions

View file

@ -513,6 +513,27 @@ export interface AstroUserConfig {
*/
drafts?: boolean;
/**
* @docs
* @name markdown.mode
* @type {'md' | 'mdx'}
* @default `mdx`
* @description
* Control if markdown processing is done using MDX or not.
*
* MDX processing enables you to use JSX inside your Markdown files. However, there may be instances where you don't want this behavior, and would rather use a "vanilla" markdown processor. This field allows you to control that behavior.
*
* ```js
* {
* markdown: {
* // Example: Use non-MDX processor for Markdown files
* mode: 'md',
* }
* }
* ```
*/
mode?: 'md' | 'mdx';
/**
* @docs
* @name markdown.shikiConfig