This action renders and embeds PlantUML diagrams inside Markdown files.
Markdown is a lightweight markup language widely used in blogging, documentations and also this README.md
. PlantUML is a powerful open-source tool that allows users to create diagrams from a plain text language. Thus, it is very common to have the need to insert diagrams made with PlantUML inside documentation written in Markdown.
Typically, there are two ways to do that:
- Link the image generated by the PlantUML diagram inside the Markdown file;
- Insert the code of the PlantUML diagram inside the Markdown file.
However, with both of these methods, if you make a change inside .puml
files, the Markdown files are not automatically updated. Thus, the aim is to be able to link directly the PlantUML files inside Markdown.
Adding an embedded diagram to your markdown file is very easy. Just add a link to the .puml
file in a markdown comment like this:
<!--  -->
If you only want to insert the link to a diagram, just exclude the !
before the link:
<!-- [Diagram Image Link](./path/to/your/diagram.puml) -->
For further information, please read the documentation available in the original repository of the npm library exploited: danielyaa5/puml-for-markdown.
The actions can be used very easily just by adding it to your GitHub Action's job:
jobs:
embed-puml-markdown:
- name: Check out the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Embed PlantUML inside Markdown
uses: alessandro-marcantoni/[email protected]
The scripts and documentation in this project are released under the MIT License
If you think there could be useful features that are not yet implemented or bugs that need to be fixed, please:
- Fork the repository;
- Make the changes you like;
- Make a pull request so that the feature/bug fix can be merged into this repository.