Owldoc is a tool for generating prose documentation using Node.js, in the style of Sphinx. It accepts a Markdown file and an EJS template file, and proceeds to generate a documentation file with them.
Owldoc is freely distributable under the terms of the MIT license.
$ owldoc docs.md > docs.html
And hey presto, your documentation is now generated!
The template is supplied with the following context variables:
The text of the first heading.
Contains the rendered Markdown.
Contains a table of contents tree. It has three attributes:
idwhich contains the anchor to a section,
childrenwhich contain all items underneath this level, and
titlefor the text of the section. If
null, then this section doesn't actually exist, and the item is there just to act as a placeholder.
During rendering, all headings are given
id attributes for anchors. These
anchors are resolved in order — for instance, the anchor to this section is
#Rendering. If another section was named "Rendering" after this
section, then the anchor to that section will be named
If you want to override the anchor text, simply surround the section of the
title you want to make the anchor with