Friday 9 November 2012

Sexy documentation with Markdown and mdoc

I've been looking for a way to standardise our company's internal documentation.

Goals:

  • Super easy to and quick to edit.
  • Nice HTML output with solid sidebar navigation.
  • Decent search built-in.

First I tried a FogBugz Wiki. Then I started looking at DocBook, then Sphynx, and then AsciiDoc was looking good. Then I found mdoc. Yeah baby!

Look at the output. Isn't that beautiful?

Using mdoc on Windows

  1. Install NodeJS. The installer isn't perfect, you might need to add it manually to your windows PATH variables.
  2. Install mdoc (npm install mdoc).
  3. Write some Markdown.
  4. Run mdoc on it - mdoc --title MyDocs -i InputDir -o OutputDir
  5. Done.
Note - you need to view your generated docs via a webserver if you wanna get the automatic sidebar action (it loads in via JS).