Updated markdownOptions config type (#2826)
* Updated markdownOptions config type * removed rehype-toc
This commit is contained in:
parent
715fab4faf
commit
52e75475ae
1 changed files with 35 additions and 27 deletions
|
@ -166,24 +166,32 @@ export interface AstroUserConfig {
|
||||||
* Configure how markdown files (`.md`) are rendered.
|
* Configure how markdown files (`.md`) are rendered.
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* {
|
* import { defineConfig } from "astro/config";
|
||||||
|
* import astroRemark from "@astrojs/markdown-remark";
|
||||||
|
* import customRehypePlugin from "/path/to/rehypePlugin.mjs";
|
||||||
|
*
|
||||||
|
* export default defineConfig({
|
||||||
|
* // Enable Custom Markdown options, plugins, etc.
|
||||||
* markdownOptions: {
|
* markdownOptions: {
|
||||||
|
* render: [
|
||||||
|
* // The Remark parser to parse Markdown content
|
||||||
|
* astroRemark,
|
||||||
|
* {
|
||||||
* // Add a Remark plugin to your project.
|
* // Add a Remark plugin to your project.
|
||||||
* remarkPlugins: [
|
* remarkPlugins: ["remark-code-titles"],
|
||||||
* ['remark-autolink-headings', { behavior: 'prepend'}],
|
*
|
||||||
* ],
|
|
||||||
* // Add a Rehype plugin to your project.
|
* // Add a Rehype plugin to your project.
|
||||||
* rehypePlugins: [
|
* rehypePlugins: [
|
||||||
* 'rehype-slug',
|
* "rehype-slug",
|
||||||
* ['rehype-autolink-headings', { behavior: 'prepend'}],
|
* [customRehypePlugin, { configKey: "value" }],
|
||||||
|
* ["rehype-autolink-headings", { behavior: "prepend" }],
|
||||||
* ],
|
* ],
|
||||||
* // Customize syntax highlighting
|
|
||||||
* syntaxHighlight: 'shiki',
|
|
||||||
* },
|
* },
|
||||||
* }
|
* ],
|
||||||
|
* },
|
||||||
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
/** Options for rendering markdown content */
|
|
||||||
markdownOptions?: {
|
markdownOptions?: {
|
||||||
render?: MarkdownRenderOptions;
|
render?: MarkdownRenderOptions;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue