mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 18:07:00 +02:00
feat: support mermaid code blocks in Markdown (#7490)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
d2fdd981f7
commit
9c92a79d23
39 changed files with 1666 additions and 13 deletions
16
packages/docusaurus-types/src/config.d.ts
vendored
16
packages/docusaurus-types/src/config.d.ts
vendored
|
@ -16,6 +16,20 @@ export type ThemeConfig = {
|
|||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
export type MarkdownConfig = {
|
||||
/**
|
||||
* Allow mermaid language code blocks to be rendered into Mermaid diagrams:
|
||||
*
|
||||
* - `true`: code blocks with language mermaid will be rendered.
|
||||
* - `false` | `undefined` (default): code blocks with language mermaid
|
||||
* will be left as code blocks.
|
||||
*
|
||||
* @see https://docusaurus.io/docs/markdown-features/diagrams/
|
||||
* @default false
|
||||
*/
|
||||
mermaid?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Docusaurus config, after validation/normalization.
|
||||
*/
|
||||
|
@ -277,6 +291,8 @@ export type DocusaurusConfig = {
|
|||
*/
|
||||
jsLoader: 'babel' | ((isServer: boolean) => RuleSetRule);
|
||||
};
|
||||
/** Markdown-related options. */
|
||||
markdown: MarkdownConfig;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
1
packages/docusaurus-types/src/index.d.ts
vendored
1
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -8,6 +8,7 @@
|
|||
export {
|
||||
ReportingSeverity,
|
||||
ThemeConfig,
|
||||
MarkdownConfig,
|
||||
DocusaurusConfig,
|
||||
Config,
|
||||
} from './config';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue