Is a simple piece of rack middleware1 which allows me to write stuff in textile, give it structure with mustache, and deploy it easily. It was designed for documentation, hence the name.
- Install the gem:
gem install doco
- Create your file structure, here’s an example:
dir/ |-- config.ru |-- layouts | `-- default.mustache `-- pages `-- index.textile
- Add Doco to your
config.ru
:
require 'doco' use Rack::Doco
- Serve it up using your favourite rack server!
Doco’s middleware can have a few options passed to it, these are:
:url => '/' # path at which to mount Doco
:root => Dir.pwd # path in which to locate the `layouts` and `pages` directories.
Patches are welcome, as is feedback, feel free to send either as a message on github
1 Maybe it’s a rack application, not middleware? I’m still learning this stuff! Hopefully it’s actually middleware now.