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: 7
      lib_version: 0.18
      view_version: 0.18

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

plugins:
  - markmap:
      # disable the default assets first
      d3_version: ''
      lib_version: ''
      view_version: ''

extra_javascript:
  - https://unpkg.com/d3@7/dist/d3.min.js
  - https://unpkg.com/markmap-lib@0.18/dist/browser/index.iife.js
  - https://unpkg.com/markmap-view@0.18/dist/browser/index.js

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.5.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_markmap-2.5.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_markmap-2.5.2.tar.gz.

File metadata

  • Download URL: mkdocs_markmap-2.5.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for mkdocs_markmap-2.5.2.tar.gz
Algorithm Hash digest
SHA256 993bc33786adf148a70ae70376b236d61345279ab390cc0c6cb7fbc7232fb7a9
MD5 a7c849b0cc544215a8866c7499de2809
BLAKE2b-256 b47b3bdde35c74ff9ac1d0e2f98fbe45724a3f8782198562617a034df7bd3443

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mkdocs_markmap-2.5.2-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for mkdocs_markmap-2.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a8c256821f722275c803e8237a21f00f8d2f628306827c8e5972a1f4f59ccdb0
MD5 ffc8626519013e85a0e0f7b9abaaf78c
BLAKE2b-256 07b4c695673eeb5bcacfad1315cb00f22e3575f395b9313bf21053517851f009

See more details on using hashes here.

Supported by

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