diff options
author | 2022-07-12 06:07:51 -0700 | |
---|---|---|
committer | 2022-07-12 09:07:51 -0400 | |
commit | b4cb4a40df33b82bcd36e63bd488bd037e94dbc0 (patch) | |
tree | 55c135602c820d89bd6e24270d7a3c4f85f35760 | |
parent | c4f6fdf3722b9bc2192cab735498f4e0c30c982e (diff) | |
download | astro-b4cb4a40df33b82bcd36e63bd488bd037e94dbc0.tar.gz astro-b4cb4a40df33b82bcd36e63bd488bd037e94dbc0.tar.zst astro-b4cb4a40df33b82bcd36e63bd488bd037e94dbc0.zip |
fix: add TypeScript type and documentation for markdown "mode" config (#3883)
* fix: add TypeScript type and documentation for markdown "mode" config
* chore: add changeset
-rw-r--r-- | .changeset/beige-lizards-scream.md | 5 | ||||
-rw-r--r-- | packages/astro/src/@types/astro.ts | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/.changeset/beige-lizards-scream.md b/.changeset/beige-lizards-scream.md new file mode 100644 index 000000000..12fce71b4 --- /dev/null +++ b/.changeset/beige-lizards-scream.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Added "mode" to Astro config file TypeScript definitions diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index fff3f9f6c..78ba9e301 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -515,6 +515,27 @@ export interface AstroUserConfig { /** * @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 * @typeraw {Partial<ShikiConfig>} * @description |