Active Markdown is a tool for making reactive documents using a plain text markdown source, with a special notation for adding interactive controls and variables. The logic is determined by the contents of the code blocks, which are actually executed on-the-fly to update the variables. Think Literate CoffeeScript meets Tangle.
Click and drag on “500 miles”: I would walk 500. miles and I would walk 500 more…
And edit this CoffeeScript to say @walk_distance * 3
:
@second_walk = @walk_distance * 1
That was generated from this markdown:
The activemd
command is written in CoffeeScript, and runs using Node.
$ npm install -g active-markdown
$ activemd --sample
sample.md
file into sample.html
: $ activemd sample.md
sample.html
in your favorite browser: $ open sample.html
View the source and hack away, file issues, and suggest notation improvements on GitHub.
See the reference for a thorough breakdown of the possible elements and their configurations. (Raw markdown source, naturally.)
See the API docs for information about using the ActiveMarkdown
module for programmatic parsing on the server and in the browser.
A sample raw Active Markdown file looks like this:
which the activemd
command turns into:
By Alec Perkins