Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Rokko — fat-free Rocco

Rokko is an else one Ruby port of Docco, the quick-and-dirty, hundred-line-long, literate-programming-style documentation generator.

Rokko reads Ruby source files and produces annotated source documentation in HTML format. Comments are formatted with Markdown and presented alongside syntax highlighted code so as to give an annotation effect.

Why Rokko?

  • Rokko supports only Ruby source files (consider using Rocco if you need more languages).
  • Rokko uses awesome highlight.js library for syntax highlighting.
  • Rokko can generate offline-ready documentation (all assets are bundled).
  • Rokko can generate an index file with links to everything (like Table of Contents).


Install with Rubygems:

sudo gem install rokko

or Bundler:

gem 'rokko'


rokko command can be used to generate documentation for a set of Ruby source files:

rokko -o docs lib/*.rb

It is also possible to use Rokko as a Rake task:

require 'rokko/task', 'docs', # task name, output directory
                ['lib/**/*.rb', ''],
                index: true, local: true)

And run:

rake rokko

Options and configuration

  • -l, --local — generate offline-ready documentation.
  • -i, --index — generate index.html with links (TOC) to all generated HTML files.
  • -i <file>, --index=<file> — use <file> as index.html.
  • -o, --output=<dir> — directory where generated HTML files are written.
  • -s, --stylesheet=<url> — CSS stylesheet to use instead of default one.

Rake task

Usage:, output_dir, filelist, opts)

Available options:

  • :local — generate offline-ready documentation.
  • index: true — generate index.html with links (TOC) to all generated HTML files.
  • index: <file> — use <file> as index.html.
  • :stylesheet — CSS stylesheet to use instead of default one.
Something went wrong with that request. Please try again.