Skip to content

Pre-render all mermaid diagrams #13

@mthomas-ketchbrook

Description

@mthomas-ketchbrook

We have been having a lot of trouble at the intersection of Quarto/Mermaid/Typst recently, getting errors during quarto render that sometimes even say "This is a known bug with Quarto".

We have remediated this by pre-rendering all mermaid diagrams from .mmd files to .png files, and then simply linking to the .png files as figures in the associated .qmd file.

Let's restructure this repository to accomplish the following:

  1. Create a mmd/ directory for storing .mmd files
  2. Update the Dev Container specification and add necessary json configuration files
  3. Create a bash file for mermaid-cli to render the .mmd files to .png files stores in a git-ignored www/ directory
  4. Update _quarto.qml with a pre-render option to run the bash script before rendering the .qmd file(s)
  5. Remove mermaid chunks from .qmd file(s) and replace them with markdown-style figure references

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions