Gitlab Mermaid



Goal

Mermaid can render sequence diagrams. SequenceDiagram Alice-John: Hello John, how are you? John-Alice: Great! Syntax Participants. The participants can be defined implicitly as in the first example on this page. The participants or actors are rendered in order of appearance in the diagram source text.

  1. GitLab Flavored Markdown turns that reference into a link so you can navigate between them. Additionally, GitLab Flavored Markdown recognizes certain cross-project references and also has a shorthand version to reference other projects from the same namespace. GitLab Flavored Markdown recognizes the following.
  2. If you are using Gitlab on gitlab.com, then the problem is being caused by your PC. I typed your markdown on my gitlab.com repo, and my diagram appeared just fine (See image). Try using a different browser or clearing the browser's cache. If you are using Gitlab on a hosted server, report this to your system administrator.

To provide an open-source alternative to the Docker imageescalope/pandoc-mermaid-plantuml, whose Dockerfile isn’tavailable.

The rationale behind these difficult setup is simple: construct informativeMermaid diagram with intuitive Markdown syntax in an open-source andeconomic way.

This newly constructed Docker image is entirely on GitLab. NoDocker Hub account is needed. For sample usage, consult .gitlab-ci.yml inmy test project.

Difficulties

Gitlab Mermaid
  1. issues raghur/mermaid-filter#51 and #52
  2. issue gitlab-org/gitlab-runner#4566

Useful code/articles

  1. time-machine-project/requests-for-comments@470b0c5Dockerfile
  2. Best practices for building docker images with GitLab CIwith the accompanying gist
  3. The code block in the highlighted comment in item 2 of the above section
  4. Sample Dockerfile for Alpine Linux in the troubleshooting of Puppeteer
  5. sc250024/docker-mermaid-cli@3c9ddb5src/puppeteerConfigFile.json
  6. raghur/mermaid-filter project README’s section about Puppeteer configfile
Latest version

Released:

Exports mermaid diagrams in Markdown documents as images.

Project description

markdown-mermaid-to-images

A CLI tool for publishing markdown articles to dev.to. The tool will also update articles if they already existon dev.to. It matches articles based on title in the frontmatter.

> Info: You will need to have pandoc preinstalled <https://pandoc.org/installing.html>_ for this script to work correctly. Or you can use the Docker image instead.

Usage

Usage: markdown_mermaid_to_images [OPTIONS]

Exports mermaid diagrams in Markdown documents as images.
Options:
-m, --file PATH
Path to markdown file, where the mermaidcode blocks will be converted to images.
-f, --folder PATH
Path to folder where we will convert allmarkdown mermaid code blocks to images.
-i, --ignore PATH
Path to folder to ignore, markdown files inthis folder will not be converted.
-o, --output PATH
Path to folder where to save the newmarkdown files. [required]
-l, --log-level
[DEBUG|INFO|ERROR]Log level for the script.
--helpShow this message and exit.

Docker Image

You can also use the Docker image that comes with all the dependencies preinstalled. In this exampleyou can find the output in tests/data/output on your host machine.

Example Markdown File

Where an example markdown file may look something like this. The meramid code blocksmust be surrounded by three ` and have the class mermaid.

This will then get converted into a file that looks like

GitLab CI

You can use also use this in your CI/CD with the provided Docker image. Below is an example .gitlab-ci.yml file,you may wish to use or include. The advantage of this is you can publish your aritcles using CI/CD.

Changelog

You can find the changelog here.

Gitlab Mermaid Sequence Diagram

Project details


Release historyRelease notifications | RSS feed

0.2.1.post1

0.2.0

0.1.5

0.1.4

0.1.3.post1

0.1.2

0.1.1

0.1.0.post1

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for markdown-mermaid-to-images, version 0.2.1.post1
Filename, sizeFile typePython versionUpload dateHashes
Filename, size markdown-mermaid-to-images-0.2.1.post1.tar.gz (6.8 kB) File type Source Python version None Upload dateHashes
DiagramCloseGitlab Mermaid

Hashes for markdown-mermaid-to-images-0.2.1.post1.tar.gz

Gitlab Mermaid Toy

Hashes for markdown-mermaid-to-images-0.2.1.post1.tar.gz
AlgorithmHash digest
SHA256a14923445e357f961144f866c5bb731f970211573d469406baf6340281099e0f
MD539bf4440bdb491039327cdcfca404176
BLAKE2-256df300f09abbd082d1ba26f9dacf804dccf5f1852d40cd6d58b186eb85fd9894d