middleman/middleman — pull request #261 by bhollis (2012-02-05 07:14:26+00:00)
Title: Callback-based rerouting 

This series of changes introduces the `reroute` method on `Middleman::Sitemap::Store`, which allows for registering callbacks that can mutate the destination path of a page. Given that, I rewrote how the builder and `process_request` work to take advantage of these new callbacks and some new properties on `Middleman::Sitemap::Page` (as well as trying to pass `Page`s around more instead of just paths). You can see how much this simplifies the `directory_indexes` extension, and I'm hoping this can be the basis for a clean implementation of issue #174 and middleman/middleman-blog#15.