darkfish icon indicating copy to clipboard operation
darkfish copied to clipboard

A project to make a complete replacement for the default HTML generator for Rdoc, the API documentation-extraction system for Ruby. (github mirror)

= Darkfish Rdoc Generator

This is a complete replacement for the default HTML generator for Rdoc 2.

I created it with a few goals in mind:

  • Replace the four-frame layout with three different indexes with a single-page, class/module-focused view.

  • I helped write what became the default look and feel for Rdoc, but it's starting to show its age. I wanted to update it with new CSS and Javascript for modern browsers.

  • Add some of the nifty searching and index-on-the-side stuff I liked from the modified Allison template (http://www.superalloy.nl/blog/?p=7) Eloy Duran came up with.

  • Implemented using separate ERB template files instead of Rdoc's constants-in-a-module style templating.

I think I mostly succeeded, and it's nice enough that I wanted to use it for all my documentation, and I thought you might want to, too. Or at least be able to tweak it to generate your own spiffy docs.

It looks like this:

http://deveiate.org/darkfish_preview.png

== Getting Started

If you haven't installed it yet, you can install it via RubyGems:

$ sudo gem install darkfish-rdoc

Or download the source and do:

$ sudo rake install

== Usage

If you're using RDoc 2.3 or later, the Darkfish formatter will be automatically discovered when RDoc is loaded, so you only have to specify that you want the 'darkfish' formatter:

$ rdoc -w 4 -SHN -f darkfish -m README README lib

It's equally easy to specify from a Rakefile in an RDocTask:

Task: rdoc

require 'rake/rdoctask' gem 'darkfish-rdoc' # Omit this if it's installed as a regular library

Rake::RDocTask.new do |rdoc| rdoc.title = "My Awesome SnoCone Library"

rdoc.options += [
    '-w', '4',
    '-SHN',
    '-f', 'darkfish', # This bit
    '-m', 'README',
  ]

rdoc.rdoc_files.include 'README'
rdoc.rdoc_files.include 'lib/snocone.rb'

end

That's it.

== Feedback

I'd be happy to have feedback via email (ged at FaerieMUD dot org) or a ticket on the project's Trac:

http://deveiate.org/projects/Darkfish-RDoc/

== License

See the LICENSE file included with the distribution for copyright and licensing details.