Skip to content

Commit 97b0cc7

Browse files
docs: add links to the Markdown guide in the markdown.options config (#17661)
Co-authored-by: delucis <357379+delucis@users.noreply.github.com>
1 parent 42623f2 commit 97b0cc7

2 files changed

Lines changed: 27 additions & 7 deletions

File tree

.changeset/lemon-owls-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Improves Markdown options documentation with links to the Markdown guide and official processors.

packages/astro/src/types/public/config.ts

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,9 @@ export interface AstroUserConfig<
23622362
* @docs
23632363
* @name markdown.remarkPlugins
23642364
* @type {RemarkPlugins}
2365-
* @deprecated Pass `remarkPlugins` to `unified({ remarkPlugins })` from `@astrojs/markdown-remark` and set it as `markdown.processor` instead. Will be removed in a future major.
2365+
* @deprecated This property is deprecated and will be removed in a future major version. Pass plugins to the configured [`markdown.processor`](https://docs.astro.build/en/reference/configuration-reference/#markdownprocessor) instead.
2366+
*
2367+
* Learn more about [setting up a Markdown processor](https://docs.astro.build/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using plugins](https://docs.astro.build/en/guides/markdown-content/#markdown-processor-plugins) in the Markdown guide.
23662368
* @description
23672369
* Pass [remark plugins](https://github.com/remarkjs/remark) to customize how your Markdown is built. You can import and apply the plugin function (recommended), or pass the plugin name as a string.
23682370
*
@@ -2380,7 +2382,9 @@ export interface AstroUserConfig<
23802382
* @docs
23812383
* @name markdown.rehypePlugins
23822384
* @type {RehypePlugins}
2383-
* @deprecated Pass `rehypePlugins` to `unified({ rehypePlugins })` from `@astrojs/markdown-remark` and set it as `markdown.processor` instead. Will be removed in a future major.
2385+
* @deprecated This property is deprecated and will be removed in a future major version. Pass plugins to the configured [`markdown.processor`](https://docs.astro.build/en/reference/configuration-reference/#markdownprocessor) instead.
2386+
2387+
* Learn more about [setting up a Markdown processor](https://docs.astro.build/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using plugins](https://docs.astro.build/en/guides/markdown-content/#markdown-processor-plugins) in the Markdown guide.
23842388
* @description
23852389
* Pass [rehype plugins](https://github.com/remarkjs/remark-rehype) to customize how your Markdown's output HTML is processed. You can import and apply the plugin function (recommended), or pass the plugin name as a string.
23862390
*
@@ -2400,7 +2404,9 @@ export interface AstroUserConfig<
24002404
* @type {boolean}
24012405
* @default `true`
24022406
* @version 2.0.0
2403-
* @deprecated Pass `gfm` to your processor instead (e.g. `unified({ gfm: false })`). Will be removed in a future major.
2407+
* @deprecated This property is deprecated and will be removed in a future major version. Pass `gfm` to the configured [`markdown.processor`](https://docs.astro.build/en/reference/configuration-reference/#markdownprocessor) instead.
2408+
2409+
* Learn more about [setting up a Markdown processor](https://docs.astro.build/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using GitHub-flavored Markdown](https://docs.astro.build/en/guides/markdown-content/#github-flavored-markdown) in the Markdown guide.
24042410
* @description
24052411
* Astro uses [GitHub-flavored Markdown](https://github.com/remarkjs/remark-gfm) by default. To disable this, set the `gfm` flag to `false`:
24062412
*
@@ -2420,7 +2426,9 @@ export interface AstroUserConfig<
24202426
* @type {boolean | Smartypants}
24212427
* @default `true`
24222428
* @version 2.0.0
2423-
* @deprecated Pass `smartypants` to your processor instead (e.g. `unified({ smartypants: false })`). Will be removed in a future major.
2429+
* @deprecated This property is deprecated and will be removed in a future major version. Pass it to the configured [`markdown.processor`](https://docs.astro.build/en/reference/configuration-reference/#markdownprocessor) instead. Use `smartypants` for `unified()` or `smartPunctuation` for `satteri()`.
2430+
2431+
* Learn more about [setting up a Markdown processor](https://docs.astro.build/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using smart punctuation](https://docs.astro.build/en/guides/markdown-content/#smart-punctuation) in the Markdown guide.
24242432
* @description
24252433
* Whether to use the [SmartyPants formatter](https://daringfireball.net/projects/smartypants/) to transform straight quotes into smart quotes, dashes into en/em dashes, and triple dots into ellipses.
24262434
*
@@ -2434,7 +2442,11 @@ export interface AstroUserConfig<
24342442
* @docs
24352443
* @name markdown.remarkRehype
24362444
* @type {RemarkRehype}
2437-
* @deprecated Pass `remarkRehype` to `unified({ remarkRehype })` from `@astrojs/markdown-remark` and set it as `markdown.processor` instead. Will be removed in a future major.
2445+
* @deprecated This property is deprecated and will be removed in a future major version.
2446+
2447+
* To configure footnotes, pass `remarkRehype` to the `unified()` processor or `gfm.footnotes` to the `satteri()` processor instead. Other `remark-rehype` options are only supported when using `unified()`.
2448+
2449+
* Learn more about [setting up a Markdown processor](https://docs.astro.build/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using built-in features](https://docs.astro.build/en/guides/markdown-content/#built-in-features) in the Markdown guide.
24382450
* @description
24392451
* Pass options to [remark-rehype](https://github.com/remarkjs/remark-rehype#api).
24402452
*
@@ -2455,8 +2467,9 @@ export interface AstroUserConfig<
24552467
* @type {MarkdownProcessor}
24562468
* @version 6.4.0
24572469
* @description
2458-
* Configures the Markdown processor used to render `.md` files. Defaults to `satteri()` from
2459-
* `@astrojs/markdown-satteri`, Astro's native Markdown pipeline.
2470+
* Configures the [Markdown processor](https://docs.astro.build/en/guides/markdown-content/#markdown-processors) used to render `.md` files.
2471+
*
2472+
* Sätteri, Astro’s native Markdown pipeline, is the default processor. To configure it, install `@astrojs/markdown-satteri` and pass options to `satteri()`:
24602473
*
24612474
* ```js
24622475
* // astro.config.mjs
@@ -2488,6 +2501,8 @@ export interface AstroUserConfig<
24882501
* },
24892502
* });
24902503
* ```
2504+
*
2505+
* Learn more about the [official Markdown processors and how to choose one](https://docs.astro.build/en/guides/markdown-content/#choosing-a-markdown-processor) in the Markdown guide.
24912506
*/
24922507
processor?: MarkdownProcessor;
24932508
};

0 commit comments

Comments
 (0)