Last active
August 29, 2015 14:05
-
-
Save robdaemon/f90afa6ba0aef6168a91 to your computer and use it in GitHub Desktop.
mixing asciidoctor-diagram and images into a single document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| asciidoctor-diagram allows you to mix a diagram into your doc, but GitHub doesn't render it inline. Instead, you can do this: | |
| ---- | |
| ifdef::env-github[] | |
| image::diagram.png[] | |
| endif::[] | |
| ifndef::env-github[] | |
| ["plantuml", "diagram", "png"] | |
| ----------------------------------------------- | |
| title My Diagram | |
| object MyObject { | |
| id | |
| name | |
| } | |
| MyObject <|-- MyObject | |
| ----------------------------------------------- | |
| endif::[] | |
| ---- | |
| This is obviously a very contrived diagram, but this will render the generated image, if you commit it to the repo alongside your .adoc file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment