
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
markmap-lib
Advanced tools
Visualize your Markdown as mindmaps.
This project is heavily inspired by Markmap.
Node.js >= 10 is required.
Install globally:
$ yarn global add markmap-lib
# or
$ npm install markmap-lib -g
or use with npx
:
$ npx markmap-lib
Usage: markmap [options] <input>
Create a markmap from a Markdown input file
Options:
-V, --version output the version number
-o, --output <output> specify filename of the output HTML
--enable-mathjax enable MathJax support
--enable-prism enable PrismJS support
--no-open do not open the output file after generation
-h, --help display help for command
Suppose we have a Markdown file named note.md
.
Run the following command to get an interactive mindmap:
$ markmap note.md
# without global installation
$ npx markmap-lib note.md
Then we get note.html
in the same directory, and hopefully it will be open in your default browser.
$ yarn add markmap-lib
# or
$ npm install markmap-lib
Transform Markdown to markmap data:
import { transform } from 'markmap-lib/dist/transform';
const data = transform(markdown);
Now we get the data for rendering in data
.
Render a markmap from transformed data:
Create an SVG element with explicit width and height:
<svg id="markmap" style="width: 800px; height: 800px"></svg>
Render a markmap to the SVG element:
import { Markmap } from 'markmap-lib/dist/view';
Markmap.create('#markmap', null, data);
// or pass an SVG element directly
const svgEl = document.querySelector('#markmap');
Markmap.create(svgEl, null, data);
mathJax
- MathJaxprism
- PrismJSTo enable plugins in command line, just add the related option, for example:
$ markmap note.md --enable-mathjax --enable-prism
loadPlugins
loads necessary CSS and JavaScript files.
import { Markmap, loadPlugins } from 'markmap-lib/dist/view';
loadPlugins([
'mathJax',
'prism',
])
.then(() => {
Markmap.create('#markmap', null, data);
});
FAQs
Visualize your Markdown as mindmaps with Markmap
The npm package markmap-lib receives a total of 10,798 weekly downloads. As such, markmap-lib popularity was classified as popular.
We found that markmap-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.