Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MarkdownDocs

An M2 package that turns documentation into Markdown. It works on the installed docs of any package, so the output is exactly what help shows, just in a format that can go anywhere: an mdBook site, a GitHub wiki, an Obsidian vault.

needsPackage "MarkdownDocs"
mdBook "Graphs"     -- build the Graphs docs as a book and open it in the browser

Markdown files

writeMdDocs("Graphs", "docs")

writes docs/Graphs/ with an index and one page per documentation node. LinkedPackages => true also writes the packages it links to, and LinkStyle => "wikilink" gives [[links]] for Obsidian. Examples come with the output stored at install time; nothing is re-run.

As a library

render markdown help "ideal"

markdown turns any M2 hypertext into a small Markdown tree, render makes it text, and in between you can reshuffle it however you like.

Install

installPackage("MarkdownDocs", FileName => "/path/to/MarkdownDocs/MarkdownDocs.m2")

Websites are on the next page: mdBook-based builder.

Repository