mdn / mdn/shared-assets

Mermaid support for rendering SVG

Open
#48 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Mermaid
Stars
28
Forks
18
Avg merge
10h 39m
Merged PRs (30d)
1

Description

I'd like to create a tracking issue for Mermaid support as the best candidate for maintaining SVG diagrams. There are a number of discussions about this:

Discussions:

And as for some options, if we don't want to add more JS client side or do the rendering at build time as a Yari dependency, there is the option to generate SVG from mmd files in an automated way using the CLI (a CI job / script / automation in content repo on new .mmd files, for instance).

e.g.;

npm install -g @mermaid-js/mermaid-cli
mmdc -i input.mmd -o output.svg

In terms of optimizations, there is SVGO which also has a GUI.

Related issues:

Pull requests:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked discussions, related issue mdn/yari#1678, and the referenced content pull requests. Compare client-side rendering, build-time rendering, and the mmdc automation option; the work is done when a decided approach reliably renders Mermaid diagrams as optimized SVG assets.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.