Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

codyrobbins/rails-documentation-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails Documentation Builder

It always frustrates me when I’m working with an older version of Rails that the only documentation available at api.rubyonrails.org is for the latest version of Rails. Sure, you could go hunting and picking through ~/.rvm/gems/ruby-1.X.X-pXXX@XXX/gems/activeXXX-X.X.X/lib and find the documentation in the source, but that would make me a hacker and I would prefer to remain a humble bard and not some anarchist neckbearded malcontent. So, in the grand tradition of Byron and Keates, I created this script to use SDoc to generate documentation for every version of Rails.

The documentation generated by this script is available at rails.documentation.codyrobbins.com.

Invoking

To build all the documentation, run

zsh build.zsh

It takes a long time.

Options

A few environment variables control some build options. To set them when invoking the script, just do

GOOGLE_ANALYTICS=12345 GZIP=true zsh build.zsh

Google Analytics

Set GOOGLE_ANALYTICS to a Google Analytics tracking ID to have the Google Analytics tracking code added to every page in the documentation.

Gzip

Set GZIP to compress all HTML, CSS, and Javascript files and then remove their .gz extension. This is useful if you’re going to serve the files with a Content-Encoding: gzip header.

Dependencies

Colophon

Contributing

To send patches, please fork on GitHub and submit a pull request.

Credits

© 2011 Cody Robbins. See LICENSE for details.

About

A script to use SDoc to generate documentation for all versions of Rails.

Resources

License

Stars

Watchers

Forks