Skip to main content

MkDocs plugin and extension to creates mindmaps from markdown using markmap

Project description

mkdocs-markmap

Beautiful and simple mindmaps written in markdown.

MIT license PyPI Latest Release Open Issues Open PRs

This is a plugin and an extension for mkdocs to add markmap.

Prerequisits

This plugin was tested with, but is not limited to:

  • Python 3.9
  • mkdocs 1.3

Quickstart

Install

pip install mkdocs-markmap

Configure

Add this to mkdocs.yml:

plugins:
  - markmap

Usage

This plugin supports code blocks of markdown as follows:

```markmap
# Root

## Branch 1

* Branchlet 1a
* Branchlet 1b

## Branch 2

* Branchlet 2a
* Branchlet 2b
```

It can also make use of file includes to keep your markdown tidy:

Look at this beautiful mindmap:

{!mindmap.mm.md!}

Advanced Settings

There are more options available for mkdocs.yml (shown values are defaults):

plugins:
  - markmap:
      base_path: docs
      encoding: utf-8
      file_extension: .mm.md
      d3_version: 6.7.0
      lib_version: 0.14.1
      view_version: 0.14.0

In addition, feel free to define your favourite source urls like this:

extra_javascript:
  - https://unpkg.com/d3@6.7.0/dist/d3.min.js
  - https://unpkg.com/markmap-lib@0.14.1/dist/browser/index.min.js
  - https://unpkg.com/markmap-view@0.14.0/dist/index.min.js

:warning: The urls need to contain one of these keywords to be considered as deviation from default:

  • markmap-d3
  • markmap-lib
  • markmap-view

Troubleshooting

Nav tree lists markmaps

  1. Move your markmap files to a separate folder next to docs, e.g. mindmaps
  2. Configure base_path accordingly (see Advanced Settings)

Static javascript files not working

  1. Ensure naming of javascript files matches the scheme (see Advanced Settings)
  2. Copy all javascript files to doc/js/, otherwise mkdocs will not copy static files to site/
  3. Define all files in extra_javascript, e.g.
extra_javascript:
  - js/markmap-d3.js
  - js/markmap-lib.js
  - js/markmap-view.js

Usage of proxy is preventing download of javascript files

Usually proxies should be supported by requests, which is used for downloading all required javascript files. If the issue remains, try downloading the files yourself and store them accordingly (see Static javascript files not working)

Credits :clap:

Some of the development approaches are based on implementations provided by the following projects:

Project details


Download files

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

Source Distribution

mkdocs-markmap-2.3.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

mkdocs_markmap-2.3.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-markmap-2.3.0.tar.gz.

File metadata

  • Download URL: mkdocs-markmap-2.3.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for mkdocs-markmap-2.3.0.tar.gz
Algorithm Hash digest
SHA256 a417c788535fa9017871cc7f1502679f37e4e13a521d5d419baf10459e2c268c
MD5 8bd90b46fab26890438f5dba9a3c9012
BLAKE2b-256 19fd01e594fb2f9eb6d102e46173fe6258791d65b0474ab127c93a0d210ef70f

See more details on using hashes here.

File details

Details for the file mkdocs_markmap-2.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_markmap-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e37e7f4ad122eded471f24093520ce1c71bdad877230fcb8a06c8205e60c9b72
MD5 5929f975c4520c8f0a4257db227e31f6
BLAKE2b-256 743c0f2a1ce66a8bf26402efee80a8e316ba876f54bb3cbc70da21589cbb3a82

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