Brainstorming ideas how to improve Ruby's documentation

By default RDoc hyperlinks things that look like methods, words like foo_bar. I
think it’s still occasionally overzealous when you have commonly-named classes but
I’m unsure how to make it less eager yet.

Yeah, it’s a sticky problem, I admit. In general I’d say to err on the
side of being conservative, though I’m not quite sure what that means
in practice.

One example is that, at least before, class names inside code blocks
were enlinkenated. That seems to have stopped recently; not sure if
it’s rdoc or darkfish or what that corrected it.

it has unmemorable and randomly changing anchor link
names,

This no longer happens. Example:

http://docs.seattlerb.org/minitest/MiniTest/Assertions.html#method-i-assert_empty

Yay!

it often links to a page describing a file instead of the
documented class inside that file

Please show me an example, this shouldn’t happen unless you have .rb or .txt on
the end.

With darkfish, the first thing the user sees on the left side is a
list of file names. Clicking on those gives a page (actually I think
it’s a lightbox, but same diff) with no info and no links to the
classes/modules defined inside that file.

e.g. from http://erector.rubyforge.org/rdoc/Erector.html click on
“abstract_widget.rb”. You see a big bunch o’ nothin’, not even a link
to http://erector.rubyforge.org/rdoc/Erector/AbstractWidget.html which
is what you wanted/expected when you clicked on “abstract_widget”.

For command-line docs, ri works pretty well, but the ri db is not
installed by rvm (:bangbang:!)

Run rvm docs generate

Yeah, I know, but most people don’t do this step (see ADHD note).

We’re working on improving this some in RubyGems 1.9 and forward, but that
effort has been stalled while we fix bugs for Ruby 1.9.3.

Keep up the good work!

  • A

Alex C. - [email protected] - http://alexch.github.com
Stalk me: Redirecting... | http://twitter.com/alexch |
http://alexch.tumblr.com

On Aug 5, 2011, at 13:32 , Eric W. wrote:

One (important (to me)) thing I do with my RDoc + Darkfish sites is
remove the default index.html and and replace it with the HTML for
README, leading to an index column on the left.

Contrast the following two, I prefer the latter to be the default
index page:

http://rdoc.rubyforge.org/index.html
http://rdoc.rubyforge.org/README_txt.html

SOOOO much better. I’ve added this to hoe. Thanks for the tip.

BTW… we’ll also make it so that rdoc supports this properly. It’s just
quicker to iterate on hoe.