Skip to content

fenriskiba/drawcsify

 
 

Repository files navigation

Drawcsify

This is a Docsify plugin that can embed Draw.io diagrams into your documentation.

Features

  • Simplified setup process
  • Compatibility with docsify-themeable styles
  • Background added to the diagram
  • Uses the official Draw.io viewer

Setup

To add Drawcsify to your Docsify site, add the following lines to your index.html after Docsify.

<script type="text/javascript" src="https://viewer.diagrams.net/js/viewer-static.min.js"></script>
<script src='//cdn.jsdelivr.net/npm/drawcsify@latest'></script>

Then to embed a diagram, simply add a link to the file with ':include :type=code' added at the end.

[filename](/example.drawio ':include :type=code')

Note: The file needs to end in .drawio or the extension will not recognize it as a Draw.io file.

Example

Note: This example will only work in the Github Pages site. If you are reading the README in the main page, please navigate there.

On the left, you can see a screenshot of the example.drawio file as it appears in the Draw.io desktop app. On the right is the embedded diagram generated by Drawcsify.

A screenshot from Draw.io showing what example.drawio should look like.

Note: There is currently a bug preventing headers in diagram files from displaying correctly. The fullscreen view (accessed by clicking on the diagram) will display the header correctly.

filename

License and Credit

This project is based on KonghaYao/docsify-drawio and carries over the MIT License with it.

About

This is a Docsify plugin that can embed Draw.io diagrams into your documentation.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 52.8%
  • HTML 47.2%