Skip to content

mermaid directive #20

Closed

Description

@Mpdreamz

Mermaid

Kind Link
Reference https://mystmd.org/guide/directives#directive-mermaid
Documentation https://mystmd.org/guide/diagrams

Implementation

  • Parses directives and aliases
  • Emits HTML
  • Unit tests
  • Validation (emits, warnings and errors).

Specification compliance:

  • Body (string, required)
  • Options
    • label, name (string) - Label the mermaid to be cross-referenced or explicitly linked to.

Activity

  1. added
    authoring
    and removed on Nov 6, 2024
  2. theletterf commented on Apr 10, 2025

    @theletterf
    Member

    I strongly support this proposal. I implemented Mermaid diagrams for docs-as-code in the past, and they're the solution to:

    • Versioning and authoring diagrams.
    • Avoid the variety of diagramming formats in the wild (I counted three so far).

    Let me know if you need any help with this.

    +CC @alaudazzi @bmorelli25

  3. Mpdreamz commented on Apr 10, 2025

    @Mpdreamz
    MemberAuthor

    We initially had support for mermaid but decided to rip it out. I think we are all now in favor of including this back in.

    cursorful-video-1744299611397.mp4

    I spent a little time today adding it back in in this branch: https://github.com/elastic/docs-builder/tree/feature/mermaid-support

    • Styling is a PITA, will take a full day to go over.
    • Mermaid ESM module does not play nice with parcel. I hack included it but we get a gazillion bundle files in _static need to pair with @reakaleek and @cotti

    Since this exceeded my timebox of 30minutes we will need to look into supporting this post 9.0.

  4. theletterf commented on Apr 10, 2025

    @theletterf
    Member

    Re: Styling, couldn't we use the bundled styles? (Not the default one, the monochromatic ones for light and dark themes.)

  5. Mpdreamz commented on Apr 10, 2025

    @Mpdreamz
    MemberAuthor

    Yes no, even changing the fonts is a bit tedious (but solved on that branch)

    At a minimum the colors should inherit from our theme. A day might have been an exaggeration :).

  6. theletterf commented on Oct 8, 2025

    @theletterf
    Member

    I think this is done by the existing diagram directive (alpha). #1599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authoring

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions