mkdocs-d2-plugin


Namemkdocs-d2-plugin JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/landmaj/mkdocs-d2-plugin
SummaryMkDocs plugin for D2
upload_time2024-08-21 17:01:18
maintainerNone
docs_urlNone
authorMichał Wieluński
requires_python>=3.9
licenseMIT
keywords mkdocs python markdown d2 diagram
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mkdocs-d2-plugin

A plugin for embedding D2 diagrams in MkDocs.

**Documentation and live demo can be found
[here](https://landmaj.github.io/mkdocs-d2-plugin/).**

## Requirements

* [Python](https://www.python.org/) >= 3.9
* [MkDocs](https://www.mkdocs.org/) >= 1.6.0
* [D2](https://d2lang.com) >= 0.6.3

## Installation

Install the plugin using pip:

```bash
pip install mkdocs-d2-plugin
```

And add it to your `mkdocs.yml`:

```yaml
plugins:
  - d2
```

## Usage

### Fenced code block

````md
```d2
shape: sequence_diagram
Alice -> John: Hello John, how are you?
Alice -> John.ack: John, can you hear me?
John.ack -> Alice: Hi Alice, I can hear you!
John -> Alice: I feel great!
```
````

### Image tag

```md
![Diagram](diagram.d2)
```

## Demo app

You can find demo app in the `docs` directory.
Live version is available [here](https://landmaj.github.io/mkdocs-d2-plugin/).

To run in locally:

```bash
cd docs
python3 -m venv .venv
source .venv/bin/activate
pip install mkdocs-material mkdocs-d2-plugin
mkdocs serve
```

To run it using Docker:

```bash
cd docs
docker build --tag mkdocs-d2-plugin:latest .
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-d2-plugin:latest
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/landmaj/mkdocs-d2-plugin",
    "name": "mkdocs-d2-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mkdocs python markdown d2 diagram",
    "author": "Micha\u0142 Wielu\u0144ski",
    "author_email": "michal@wielunski.net",
    "download_url": "https://files.pythonhosted.org/packages/04/87/76d3d05a5f71d4e9fbd055f5c3eaa003fd4b2c60b02e8ba0d0b85bbdef44/mkdocs_d2_plugin-1.5.0.tar.gz",
    "platform": null,
    "description": "# mkdocs-d2-plugin\n\nA plugin for embedding D2 diagrams in MkDocs.\n\n**Documentation and live demo can be found\n[here](https://landmaj.github.io/mkdocs-d2-plugin/).**\n\n## Requirements\n\n* [Python](https://www.python.org/) >= 3.9\n* [MkDocs](https://www.mkdocs.org/) >= 1.6.0\n* [D2](https://d2lang.com) >= 0.6.3\n\n## Installation\n\nInstall the plugin using pip:\n\n```bash\npip install mkdocs-d2-plugin\n```\n\nAnd add it to your `mkdocs.yml`:\n\n```yaml\nplugins:\n  - d2\n```\n\n## Usage\n\n### Fenced code block\n\n````md\n```d2\nshape: sequence_diagram\nAlice -> John: Hello John, how are you?\nAlice -> John.ack: John, can you hear me?\nJohn.ack -> Alice: Hi Alice, I can hear you!\nJohn -> Alice: I feel great!\n```\n````\n\n### Image tag\n\n```md\n![Diagram](diagram.d2)\n```\n\n## Demo app\n\nYou can find demo app in the `docs` directory.\nLive version is available [here](https://landmaj.github.io/mkdocs-d2-plugin/).\n\nTo run in locally:\n\n```bash\ncd docs\npython3 -m venv .venv\nsource .venv/bin/activate\npip install mkdocs-material mkdocs-d2-plugin\nmkdocs serve\n```\n\nTo run it using Docker:\n\n```bash\ncd docs\ndocker build --tag mkdocs-d2-plugin:latest .\ndocker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-d2-plugin:latest\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MkDocs plugin for D2",
    "version": "1.5.0",
    "project_urls": {
        "Homepage": "https://github.com/landmaj/mkdocs-d2-plugin"
    },
    "split_keywords": [
        "mkdocs",
        "python",
        "markdown",
        "d2",
        "diagram"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8c9bae2b2378d41e38a4459795309e6f3e55bb1c8949b87430c2959d05eaf8a",
                "md5": "b7cfdf9ac74109e8826d5738486b1981",
                "sha256": "f3206e637b6ca44d04f8ad061fc3baaa48e98da7cf4667724499489803abc86f"
            },
            "downloads": -1,
            "filename": "mkdocs_d2_plugin-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7cfdf9ac74109e8826d5738486b1981",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8430,
            "upload_time": "2024-08-21T17:01:17",
            "upload_time_iso_8601": "2024-08-21T17:01:17.578480Z",
            "url": "https://files.pythonhosted.org/packages/f8/c9/bae2b2378d41e38a4459795309e6f3e55bb1c8949b87430c2959d05eaf8a/mkdocs_d2_plugin-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "048776d3d05a5f71d4e9fbd055f5c3eaa003fd4b2c60b02e8ba0d0b85bbdef44",
                "md5": "b924b1ea16de94b0432e65a2231dd861",
                "sha256": "d37cf890db315dff601bc1118dc26e5ad5533fb49d8c3b57f06d68badb3b52e4"
            },
            "downloads": -1,
            "filename": "mkdocs_d2_plugin-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b924b1ea16de94b0432e65a2231dd861",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7937,
            "upload_time": "2024-08-21T17:01:18",
            "upload_time_iso_8601": "2024-08-21T17:01:18.758218Z",
            "url": "https://files.pythonhosted.org/packages/04/87/76d3d05a5f71d4e9fbd055f5c3eaa003fd4b2c60b02e8ba0d0b85bbdef44/mkdocs_d2_plugin-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-21 17:01:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "landmaj",
    "github_project": "mkdocs-d2-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mkdocs-d2-plugin"
}
        
Elapsed time: 0.60487s