# mkdocs-markmap
> Beautiful and simple mindmaps written in markdown.
[![MIT license](https://badgen.net/github/license/neatc0der/mkdocs-markmap)](https://github.com/neatc0der/mkdocs-markmap/blob/master/LICENSE)
[![PyPI](https://badgen.net/pypi/v/mkdocs-markmap)](https://pypi.org/project/mkdocs-markmap/)
[![Latest Release](https://badgen.net/github/release/neatc0der/mkdocs-markmap/latest)](https://github.com/neatc0der/mkdocs-markmap/releases/latest)
[![Open Issues](https://badgen.net/github/open-issues/neatc0der/mkdocs-markmap)](https://github.com/neatc0der/mkdocs-markmap/issues)
[![Open PRs](https://badgen.net/github/open-prs/neatc0der/mkdocs-markmap)](https://github.com/neatc0der/mkdocs-markmap/pulls)
This is a plugin and an extension for [mkdocs](https://github.com/mkdocs/mkdocs/) to add [markmap](https://github.com/gera2ld/markmap).
## Prerequisits
This plugin was tested with, but is not limited to:
* Python 3.9
* mkdocs 1.1
## Quickstart
### Install
```bash
pip install mkdocs-markmap
```
### Configure
Add this to `mkdocs.yml`:
```yaml
plugins:
- markmap
```
## Usage
This plugin supports code blocks of markdown as follows:
````markdown
```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:
```markdown
Look at this beautiful mindmap:
{!mindmap.mm.md!}
```
## Advanced Settings
There are more options available for `mkdocs.yml` (shown values are defaults):
```yaml
plugins:
- markmap:
base_path: docs
encoding: utf-8
file_extension: .mm.md
d3_version: 6.7.0
lib_version: 0.11.6
view_version: 0.2.6
```
In addition, feel free to define your favourite source urls like this:
```yaml
extra_javascript:
- https://unpkg.com/d3@6.7.0/dist/d3.min.js
- https://unpkg.com/markmap-lib@0.11.6/dist/browser/index.min.js
- https://unpkg.com/markmap-view@0.2.6/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](#advanced-settings))
### Static javascript files not working
1. Ensure naming of javascript files matches the scheme (see [Advanced Settings](#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.
```yaml
extra_javascript:
- js/markmap-d3.js
- js/markmap-lib.js
- js/markmap-view.js
```
### Usage of proxy is prevent 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](#static-javascript-files-not-working))
## Credits :clap:
Some of the development approaches are based on implementations provided by the following projects:
* [markmap](https://github.com/gera2ld/markmap) (key feature of this project)
* [markdown-include](https://github.com/cmacmackin/markdown-include) (basis for extension support)
* [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin) (basis for plugin support)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:mkdocs-markmap-2.2.1b.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
mkdocs-markmap-2.2.1b.tar.gz (19个子文件)
mkdocs-markmap-2.2.1
PKG-INFO 4KB
mkdocs_markmap.egg-info
PKG-INFO 4KB
requires.txt 68B
SOURCES.txt 507B
entry_points.txt 139B
top_level.txt 15B
dependency_links.txt 1B
LICENSE 1KB
mkdocs_markmap
utils.py 1KB
__init__.py 0B
__meta__.py 256B
extension.py 4KB
defaults.py 644B
static_files
mkdocs-markmap.css 170B
mkdocs-markmap.js 1KB
plugin.py 5KB
setup.cfg 38B
setup.py 2KB
README.md 3KB
共 19 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功