Generated Docs with Code Illuminated
April 8th, 2009 in scripts | 1 Comment
I really like the documentation generated by Code Illuminated, but I don’t like the inline documentation format, which has to look something like this:
// ** {{{ App.addMenuItem() }}} **
//
// Adds a menu item to the {{{element}}} DOM node showing the {{{label}}}
// text. If {{{urlOrCallback}}} is an URL, choosing the item causes a new
// window to be opened with that URL. If it's a function, it will be called
// when choosing the item.
//
// If the node does not have a menu yet, one will be created.
I think this renders the inline documentation unreadable. Natural Docs has a lot nicer format that would look like this:
/* Function: App.addMenu Adds a menu item to the element DOM node showing the label text. If urlOrCallback is an URL, choosing the item causes a new window to be opened with that URL. If it's a function, it will be called when choosing the item. If the node does not have a menu yet, one will be created. */
So I took Code Illuminated and made half of it into a PHP script so it wasn’t limited to same-domain ajax calls. I also added a very basic Natural Docs parser and a Markdown parser, code highlighting courtesy of GeSHi, and caching. Here’s a demo. It’s nothing special right now and needs a lot more work. In particular, I need a full-fledged Natural Docs parser in PHP. Anyone have one handy?
Is anyone interested in this? I’ll be using it for JibberBook documentation, but I don’t know if I’ll release it unless there’s an interest in it.

Hi, I'm Chris, a passionate freelance web developer. My languages of choice are PHP and JavaScript, and that's what you'll mostly find in my blog. You'll also find updates about 