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

Support for mermaid.js #94

Open
dkadiog opened this issue Nov 10, 2022 · 0 comments
Open

Support for mermaid.js #94

dkadiog opened this issue Nov 10, 2022 · 0 comments
Labels
feature New feature or request

Comments

@dkadiog
Copy link

dkadiog commented Nov 10, 2022

Feature Request

Feature Suggestion

As github supports mermaid.js diagrams in markdown, it would be nice to also support it in the generated html files.

Context

writing mermaid diagrams in the adr markdowns using Githubs mermaid diagrams, should be rendered as diagram in the html files generated by "log4brains build".

I tryed to make it work by writing accoring the sample on mermaid.js direclty in the markdoww adr.

<pre class="mermaid">
  graph LR
      A --- B
      B-->C[fa:fa-ban forbidden]
      B-->D(fa:fa-spinner);
</pre>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.2.1/mermaid.min.js"/>
<script>
  mermaid.initialize({ startOnLoad: true });
</script>

works for html files in gh-pages but editing the mardkown with a previewer locally wouldnt render the diagram correctly.
So by writing mermaid markdown syntax, like following, the rendered index file should render something like above.

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
\```
@dkadiog dkadiog added the feature New feature or request label Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant