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.
- 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.
- 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
- issues raghur/mermaid-filter#51 and #52
- issue gitlab-org/gitlab-runner#4566
Useful code/articles
- time-machine-project/requests-for-comments@
470b0c5
Dockerfile
- Best practices for building docker images with GitLab CIwith the accompanying gist
- The code block in the highlighted comment in item 2 of the above section
- Sample
Dockerfile
for Alpine Linux in the troubleshooting of Puppeteer - sc250024/docker-mermaid-cli@
3c9ddb5
src/puppeteerConfigFile.json
- raghur/mermaid-filter project README’s section about Puppeteer configfile
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.
-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. | |
--help | Show 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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size markdown-mermaid-to-images-0.2.1.post1.tar.gz (6.8 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for markdown-mermaid-to-images-0.2.1.post1.tar.gz
Gitlab Mermaid Toy
Algorithm | Hash digest |
---|---|
SHA256 | a14923445e357f961144f866c5bb731f970211573d469406baf6340281099e0f |
MD5 | 39bf4440bdb491039327cdcfca404176 |
BLAKE2-256 | df300f09abbd082d1ba26f9dacf804dccf5f1852d40cd6d58b186eb85fd9894d |