I like the way rdoc html looks better when using Jamis B.'s rdoc
template:
So I put a copy here:
/usr/local/lib/ruby/1.8/rdoc/generators/template/html/jamis.rb
and with a little help I can get rails to use it when making
documentation for my apps, itself, and the plugins I use.
I wanted to use it with the rdoc for my gems so I added a ~/.gemrc
file to my home directory with this in it:
rdoc: --template jamis --inline-source --line-numbers
Now when gem builds the rodc these options are used …
BUT …
gem_server doesn’t actually serve the rdoc-style.css files that rdoc
creates – instead it appears to delivers a copy of the standard rdoc
1.0.1 template that is hard-coded into gem_server.rb.
line 398 (rubygems/sever.rb):
s.mount_proc("/rdoc-style.css") do |req, res|
res['content-type'] = 'text/css'
res['date'] = File.stat(spec_dir).mtime
res.body << RDOC_CSS
end
rdoc appears to put a copy of rdoc-style.css in the root of every
html output folder it creates. However gem_server always uses it’s
own css.
Ths fixes the problem by only using the hard-coded stylesheet for the
top level document.
— rubygems/old_server.rb 2007-02-10 09:07:01.000000000 -0500
+++ rubygems/server.rb 2007-09-01 20:34:12.000000000 -0400
@@ -33,7 +33,7 @@
- s.mount_proc(“/rdoc-style.css”) do |req, res|
- s.mount_proc(“/gem-server-rdoc-style.css”) do |req, res|
res[‘content-type’] = ‘text/css’
res[‘date’] = File.stat(spec_dir).mtime
res.body << RDOC_CSS
Patch also sent to http://rubyforge.org/projects/rubygems/
http://rubyforge.org/tracker/index.php?func=detail&aid=13589&group_id=126&atid=577