Darkfish Rdoc Generator

This is a project to make a complete replacement for the default HTML generator for Rdoc, the API documentation-extraction system for Ruby.

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.
  • Clean up the default look a bit. I wrote what became the default look and feel for Rdoc, and I wanted to update it to be a little more rounded, with some updated 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 Eloy Duran came up with.
  • Implemented using ERB templates instead of Rdoc's constants-in-a-module style templating.
  • Merge the stuff contained in the files view with the stuff in the class view. I never really understood why Dave chose to separate the two.

I think I mostly succeeded, and it's nice enough that I wanted to use it for all my documentation. It looks like this:

Preview of Darkfish Rdoc

It was spawned from some work I did for the Rdoc in ThingFish, a project I'm hacking on for work.

It requires Rdoc 2, but once you have that installed, you can do:

# (In a Rakefile somewhere:)

# Load the generator and tell Rdoc about it
gem 'darkfish-rdoc'
require 'darkfish-rdoc'

Rake::RDocTask.new do |rdoc|
    rdoc.title    = "MyFantasticLibrary - a library of utter fantasticness"
    rdoc.rdoc_files.include 'README'

    rdoc.options += [
        '-SHN',
        '-f', 'darkfish',  # This is the important bit
      ]
end

Downloads

You can also download the latest source via Subversion like so:

svn co svn://deveiate.org/Darkfish-Rdoc/trunk Darkfish-Rdoc

or as a Zip archive from the link at the bottom of the page in the the source browser:

Screenshot of the Zip Archive download link

About Trac

Trac is a minimalistic approach to web-based management of software projects. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress.

TracGuide is a good place to start if you want to learn more.

Attachments