Skip to main content

Mermaid graph support for sphinx generated documentations

Project description

Mermaid support for Sphinx documentation

Mermaid graphs support for sphinx generated documentations.

Install

pip install sphinx-mermaid

Setup in conf.py

In the conf.py file of your documentation, add the extension:

extensions = [
    ...,
    'sphinxmermaid'
]

Config Options

sphinxmermaid_mermaid_init can be set as a dictionary of values.

These will be passed to mermaid.initialize(). Find more info at MermaidJS

Example:

sphinxmermaid_mermaid_init = {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#BB2528',
    'primaryTextColor': '#fff',
    'primaryBorderColor': '#7C0000',
    'lineColor': '#F8B229',
    'secondaryColor': '#006100',
    'tertiaryColor': '#fff'
  }
}

Usage

In your rst (or md) files, use the directive just like:

.. mermaid ::

    graph TD
    A --> B
    B -- Label --> C

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sphinx_mermaid-0.0.8-py2.py3-none-any.whl (3.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sphinx_mermaid-0.0.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_mermaid-0.0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 03cbad30c04130e5644c5112b4b2da7850d142f897876ac5aea83c8b5965bf76
MD5 fc33f5e6a7b94d639a6db68541ea66bf
BLAKE2b-256 bd6596cb3a4117ea2a4ead808377259659885ea0fe5e539a9f29fc1c8a723ed1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page