Guidance for FHIR IG Creation
0.1.0 - CI Build
Guidance for FHIR IG Creation, published by HL7 International - FHIR Management Group. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/ig-guidance/ and changes regularly. See the Directory of published versions
PlantUML diagrams can be added by:
The following example shows how:
The source diagram is a file in the input/images-source
folder. The extension must be .plantuml
e.g. filename.plantuml
. The IG Publisher will generate a file called filename.svg
which can be used in the IG pages.
PlantUML has several diagram types and special features. Documentation and examples are abundant out there, so here are a few starting points:
Simple diagrams are easy to make but more advanced features can be added. Adding these features will normally require some local iterations. The best is to either
Here's another perspective on how PlantUML is used:
To include a diagram in a markdown page, after creating the diagram source, we can use a simple jekyll include tag:
{% include filename.svg %}
Where filename is the name of the file that contains the diagram source. Given the way markdown is processed, the text may end up wrapped around the diagram. To resolve this, we can add a <br clear="all"/>
html tag after inserting the diagram.
<div>{% include filename.svg %}</div>
<br clear="all"/>
A diagram can be added in an xhtml page by means of a jekyll include tag, possibly wrapped in a figure and with an opptional figure caption:
<figure>
{% include filename.svg %}
<figcaption>Simple diagram</figcaption>
</figure>
At the end, it may be simpler and safer to always include the svg as a html fragment inside the page - whether it's markdown or html.
<figure>
{% include filename.svg %}
<figcaption>Example with styles and other features</figcaption>
</figure>
PlantUML diagrams can use skins or themes, which define defaults for colors, fotns, diagram lines. To use this, there are several options:
skin rose
or skin BlueModern
help themes
directive:Since June 2023, the FHIR IG base template uses the new PlantUML default theme. If you want to use the "old" PlantUML style, simply add skin rose
to the beginning of the diagram.
The most common issue will be issues with PlantUML syntax.
Debugging PlantUML can be done by iterating the diagram, suported by the tools indicated above.
For reference: when building the IG, the Publisher picks the plantuml diagram source, the page(s) that reference that diagram and creates the html pages: