mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
72.79k stars 6.65k forks source link

Add documentation for front matter #4757

Open ketozhang opened 1 year ago

ketozhang commented 1 year ago

There exist front matter for all diagrams (e.g., https://github.com/mermaid-js/mermaid/pull/3706), but there are no documentation of this

ketozhang commented 1 year ago

Looks like there are only two field supported: title and displayMode? @MasonM

https://github.com/mermaid-js/mermaid/blob/31c0a0cbab3d59f3e92b16a475e95a22e278550f/packages/mermaid/src/diagram-api/frontmatter.ts#L25-L46

sidharthv96 commented 1 year ago

Yes, currently only title and displaymode are supported, but we just added full config support to frontmatter today via https://github.com/mermaid-js/mermaid/pull/4750.

That has some added documentation

ringerc commented 12 months ago

The frontmatter docs at https://mermaid.js.org/config/configuration.html don't link to the actual config schema https://mermaid.js.org/config/schema-docs/config.html

sdake commented 1 month ago

In decmeber 2022, some work was done to deprecate directives and replace with front matter. The code says "we will add autogeneration" soon. May I suggest deleting the comments?

https://github.com/mermaid-js/mermaid/commit/528facf88d7b474eef03b829b314cfd9b373fe91#diff-07b4dc784ba66fda0a8637bb0e3900db0012b9be7f4dbb52f1432e5865065708L30