GoogleChrome / webdev-infra

Apache License 2.0
40 stars 29 forks source link

Explore implementation of Mermaid diagrams via design doc #49

Closed petele closed 1 year ago

petele commented 2 years ago

Add support for mermaid style diagrams in Markdown, similar to what GitHub has done https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

jpmedley commented 2 years ago

This looks cool. Can we control the look and feel of the diagrams through CSS?

jeffposnick commented 2 years ago

For future reference: there is https://github.com/KevinGimbel/eleventy-plugin-mermaid, but that requires adding JavaScript to your pages to render the diagram at runtime.

I can't find a 11ty-specific package that renders the diagrams as SVG at build time and includes a mechanism for injecting the local SVG image onto the page.

matthiasrohmer commented 1 year ago

As a first step we want to see if there are existing open source Node.js libraries that render Mermaid diagrams and how we then could add those diagrams to our documents. The lib needs to be quick and ideally doesn't produce extra files but renders SVGs or HTML and doesn't rely on client-side rendering. Research and possible implementation notes should go in a design doc.

mollietokyo commented 1 year ago

spoke with Matthias, he's waiting on internal updates prior to marking this one as 'done'

matthiasrohmer commented 1 year ago

We will not pursue this for now.