Skip to content

blockdiag for Python Markdown through SuperFences

License

Notifications You must be signed in to change notification settings

oliversalzburg/blockdiag-fences

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockdiag for SuperFences

PyPI version

This provides blockdiag rendering for Python Markdown through the SuperFences extension.

It is based on https://github.com/gisce/markdown-blockdiag.

Install

pip install blockdiag-fences

Use

Wrap your diagram in a code block, tagged with the name of the tool to convert it:

```blockdiag
blockdiag {
	A -> B -> C -> D;
	A -> E -> F -> G;
}
```

MkDocs Integration

In your mkdocs.yml add this to markdown_extensions.

markdown_extensions:
  - pymdownx.superfences:
    custom_fences:
      - name: actdiag
        class: actdiag
        format: !!python/name:blockdiag_fences.blockdiag.fence_img_format
      - name: blockdiag
        class: blockdiag
        format: !!python/name:blockdiag_fences.blockdiag.fence_img_format
      - name: nwdiag
        class: nwdiag
        format: !!python/name:blockdiag_fences.blockdiag.fence_img_format
      - name: packetdiag
        class: packetdiag
        format: !!python/name:blockdiag_fences.blockdiag.fence_img_format
      - name: rackdiag
        class: rackdiag
        format: !!python/name:blockdiag_fences.blockdiag.fence_img_format
      - name: seqdiag
        class: seqdiag
        format: !!python/name:blockdiag_fences.blockdiag.fence_img_format

Packages

No packages published

Languages

  • Python 100.0%