Article complete

Now, Github allows diagrams and flowcharts in markdown files

Earlier, developers used to embed an image on Github in their markdown files.

A dark background with green code lines and the GitHub logo prominently displayed in the center.

Key takeaways

  • Github now supports embedding diagrams and flowcharts in markdown files using Mermaid.
  • Previously, developers faced challenges in updating embedded images for diagrams.
  • Mermaid allows automatic creation of various diagram types directly in the browser.
  • The integration simplifies documentation and boosts developer productivity by about 50%.
  • Mermaid is gaining popularity among developers and has a strong community backing.

Takeaways drafted with AI from the article text.

Github will allow developers to include diagrams and flowcharts generated using Mermaid–a JavaScript-based diagramming and charting tool–in markdown files. Developers see about 50% productivity boost with easy-to-source documentation.

Earlier, developers used to embed an image on Github in their markdown files and keeping the diagrams up to date was a major challenge.

How Mermaid works

Github generates an iframe when it encounters the code blocks marked as Mermaid.  The iframe takes the raw Mermaid syntax and passes it to Mermaid.js, which in turn turns the code into a diagram in the local browser. Github follows a two-stage process - GitHub’s HTML pipeline and Viewscreen, Github’s internal file rendering service.

Visual representation of Mermaid’s pipeline:

Mermaid helps developers to produce vector-based diagrams that can be easily embedded into the documentation. Mermaid is becoming popular with developers and has a huge community of contributors. Knut Sveidqvist maintains the Mermaid project.

Published

Spotted an error? Tell our editors. Read our editorial standards and corrections.

More in this story

GitHub · 5 stories
  1. You are here: Now, Github allows diagrams and flowcharts in markdown files
  2. GitHub to Launch 'Secret Protection' and 'Code Security' Products Soon
  3. Indian Govt Orders GitHub to Remove Jack Dorsey’s Bitchat Amid CJP Protests
  4. Slack Launches Slack Code to Bring AI Coding Into Team Workflows
  5. GitHub Migrates Copilot Runtime to Rust
About the author

Contributor

All stories
Belamy · Daily

The day’s AI news, before your first meeting.