Mermaid uses client-side rendering to render diagrams written in a simple, plain text style. These are excellent for presentations and documentation, and it would be good to have integrated support for it.
This could be done as a plugin, Statocles::Plugin::Diagram::Mermaid, which exports a template helper diagram. The helper would take the diagram syntax as a block, like:
%= diagram begin
A->>B
% end
Using the helper on a page would add the appropriate script elements to the page. The libraries themselves could be loaded from a CDN, with an option to set the URL to load the libraries from.
The plugin should be named Statocles::Plugin::Diagram::Mermaid so that we can have other diagram plugins in the future (like Ditaa)
http://knsv.github.io/mermaid/index.html#mermaid
Mermaid uses client-side rendering to render diagrams written in a simple, plain text style. These are excellent for presentations and documentation, and it would be good to have integrated support for it.
This could be done as a plugin,
Statocles::Plugin::Diagram::Mermaid
, which exports a template helperdiagram
. The helper would take the diagram syntax as a block, like:Using the helper on a page would add the appropriate script elements to the page. The libraries themselves could be loaded from a CDN, with an option to set the URL to load the libraries from.
The plugin should be named
Statocles::Plugin::Diagram::Mermaid
so that we can have other diagram plugins in the future (like Ditaa)