concept-mapmaker
Build interactive concept maps from Markdown and a small optional YAML presentation spec. Each build creates an HTML map, a downloadable Markdown copy, and a PDF.
The HTML is a single generated file, but it loads D3 and Markmap from jsDelivr when opened.
Branch types are color-coded from the legend; clicking any node reveals its description in the side panel, with a copyable deep link:
Install
pip install concept-mapmaker
Requires Python 3.10+. PDF generation is included in the default installation.
Generated maps are single HTML files that load D3, Markmap, marked and DOMPurify from the jsDelivr CDN when opened, so viewing a map needs an internet connection.
Quickstart
Run these from your content project's folder. init scaffolds a starter map, build renders it,
and serve previews the result over HTTP:
concept-map init # writes map.md + config.yaml + map.css into the current folder
concept-map build map.md # -> web/map.html (+ web/downloads/*.md/.pdf)
concept-map serve # preview at http://127.0.0.1:8080
A project is one flat folder — a source doc plus two optional files, and a generated web/:
my-project/
my-map.md
config.yaml # optional; presentation spec, auto-discovered beside the doc
map.css # optional; custom colors, auto-discovered beside the doc
web/ # generated
my-map.html
downloads/
my-map.md
my-map.pdf
CLI reference
concept-map init # scaffold map.md + config.yaml + map.css
concept-map build my-map.md # -> web/my-map.html
concept-map build my-map.md --spec presentation.yaml # explicit spec (else config.yaml beside doc)
concept-map build my-map.md --output public/map.html # override the output path
concept-map build my-map.md --template custom.html # custom node-display layout
concept-map serve # preview the newest map in web/
concept-map serve public/map.html --port 8000 # preview a specific file / port
The bundled template is the default look; --template is a layout-only extension point for
supplying your own node-display HTML. See "Python API" for passing extra __KEY__ values a custom
template needs.
Markdown authoring contract
- Headings (
#through######) define structure. - Bullets written as
- **Name**: description(-,*or+) define concepts. - Two spaces of bullet indentation add one level beneath the current heading.
- A paragraph directly under a heading becomes that heading node's description.
- A
>block under a heading or concept is its description written as full Markdown (headings, lists, tables, code); the side panel renders it. Bullets inside the>block stay part of the description and don't become concepts. - Select a node and use New window in the side panel to open its description on its own.
- A
-*-token on a heading or concept marks that node with a star.
The map shown above comes straight from these rules. Its source (examples/demo.md) begins:
# Coffee
A tiny example map — beans, ways to brew, and a few drinks.
## 1. Beans
The two species behind almost all coffee.
- **Arabica**: Smoother and sweeter with more aroma; most specialty coffee.
- **Robusta**: More caffeine and a bolder, more bitter cup; common in espresso blends.
# Coffee becomes the root (its paragraph is the root's description); each ## N. heading is a
branch whose numbering the legend matches on (below); and each - **Name**: description bullet is
a clickable concept node with the text shown in the side panel. Build it yourself with:
concept-map build examples/demo.md --spec examples/config.yaml
concept-map serve web/demo.html
YAML spec
Every field is optional:
| Key | Purpose | Default |
|---|---|---|
title |
Header brand and panel eyebrow | Map |
subtitle |
Small header subtitle | Empty |
page_title |
Browser tab title | title |
legend |
Ordered branch-type matching + labels | One neutral color, no legend |
Example:
title: Coffee Map
subtitle: A Tiny Example Map
legend:
- {match: '^1\.', key: beans, label: Beans}
- {match: '^2\.', key: brewing, label: Brewing}
Each legend entry is a branch type: the first match regex that hits a node's label sets its
branch, and the subtree inherits it. Branches are colored from a built-in palette in order (the
palette lives in the display template). With no legend, all nodes use one neutral color and the
legend is hidden.
Side panel and search
- Panel width: drag the handle between the map and the panel to resize it (double-click resets).
The width is remembered per page in the browser. To change the default for everyone, set it in
map.css::root { --panel-w: 720px; }. - Search: the search box finds concepts by name. The Concepts / Content button beside it switches to searching description text, with an excerpt shown for each hit.
Custom colors (map.css)
To override colors, drop a map.css beside the source doc (or in the project root). It is
appended after the generated branch bindings, so its rules win. Redefine a palette slot, or a
specific branch:
:root { --pal-1: #b5179e; } /* recolor the first branch type */
:root { --branch-brewing: #0e7c86; } /* recolor one branch by key */
See examples/map.css for a copy-paste starting point (concept-map init also writes one).
Python API
from concept_mapmaker import build_map, load_spec
spec = load_spec("config.yaml")
build_map("my-map.md", spec, output="web/my-map.html")
Writable output always goes to the caller's project; package installation files are read-only. The display template is bundled inside the installed wheel.
To embed the engine, build_map exposes three optional extension seams: template (a path to a
custom node-display template), parse_fn (swap in a different input parser), and extra_context
(supply or override __KEY__ values your custom template consumes):
build_map("my-map.md", spec, output="web/my-map.html",
template="custom.html", extra_context={"FOOTER": "© 2026"})
Contributing and releasing
Development setup, the test suite, and the maintainer release process (Trusted Publishing to
TestPyPI/PyPI) are documented in CONTRIBUTING.md. The worked example lives in
examples/.
Metadata
Release files for concept-mapmaker 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| concept_mapmaker-0.2.0.tar.gz | 34.6 kB | With provenance | Details for concept_mapmaker-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| concept_mapmaker-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for concept_mapmaker-0.2.0-py3-none-any.whl |
Total release size: 66.5 kB
Release files / concept_mapmaker-0.2.0.tar.gz
| Download URL | concept_mapmaker-0.2.0.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bfe82db36382227663030a9dc9aa7233bf63713664fb906891f3e3faf2aefed
|
|
BLAKE2b-256 checksum How to use checksums |
0c950ecd2d36aa22b6301f5b55beafb1f0907432e3ad106d6356f683e9d048ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / concept_mapmaker-0.2.0-py3-none-any.whl
| Download URL | concept_mapmaker-0.2.0-py3-none-any.whl |
|---|---|
| Size | 31.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ecb10c9698ef05f30568f8a9a943afe057d5368aee464383b0aa0a8a6ade877
|
|
BLAKE2b-256 checksum How to use checksums |
06054e7dc609476663c073cd758bcb95c14f8fa0d45ff411050eca45e3af62c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for concept-mapmaker 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for concept_mapmaker-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.