joyent/node — pull request #2645 by gjtorikian (2012-01-30 23:49:15+00:00)
Title: Updates for Joyent version of Node API docs

This request is based on a conversation with @isaacs and @piscisaureus so if you're not one of them, buzz off ;)

I've opted to make a new subdirectory under _/doc_, rather than destroy everything in there.

I've converted the .js files NodeManual was using into .md files for easier manipulation. There's a lot I can talk about the build system, but I'll save it for when (if?) questions come. The important thing to note is that it's based on C9's version of [ndoc](https://github.com/c9/ndoc). Also, each "segment" in a Markdown file is prefixed and suffixed with a `/**` and `**/`. ndoc needs to know when a member description begins and ends, and keeping these tags in there is more for convenience than anything else. Otherwise it has no idea how to parse just a naked Markdown file.

By and large I ripped out most of the NodeManual specific stuff (scripts for Disqus and Google Analytics; references to our "dev guide" and "js_reference" sections)--but I've kept the styles in-place, because otherwise the site looks like crap without it. The base CSS is Twitter's Bootstrap, and we've just redesigned it to fit our needs.

The main layout, as I mentioned, is a jade template, located in _resources/nodejs_ref_guide/skins/templates/layout.jade_. _nodejs_ref_menu.jade_ defines the TOC menu. _lib.jade_ is where all the fun is, and defines how to data about each member is parsed and presented.

Again, there are a *lot* of changes going on here--it's not just a simple swap of Markdown files. Please let me know if you have any questions or want to berate me for stupid design decisions.