Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin for using mermaid to generate diagrams #525

Open
preaction opened this issue Jan 7, 2017 · 0 comments
Open

Add plugin for using mermaid to generate diagrams #525

preaction opened this issue Jan 7, 2017 · 0 comments
Labels

Comments

@preaction
Copy link
Owner

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 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)

@kiwiroy kiwiroy mentioned this issue Nov 7, 2017
preaction added a commit that referenced this issue Nov 28, 2017
    [Added]

    - Added "blank" layout templates to the default and bootstrap
      themes. These templates have no adornment whatsoever, and are
      ideal for things like slide decks and pop-up windows.

    - Added 'diagram' plugin to generate diagrams from Mermaid,
      a JS-based diagram system (https://mermaidjs.github.io/). Thanks
      @kiwiroy! [Github #525]

    - Added syntax highlighting to code sections in the Perldoc
      application. Thanks @kiwiroy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant