middleman/middleman — Issue #302: Dynamic pages (per example) don't work on master
Author: smparkes
Created: 2012-03-05 20:16:16+00:00
State: open

Maybe I'm missing something, but it doesn't look like the dynamic pages example works (anymore?) on `master`. If you add the example code and an `about/template.html.haml`, you end up with `not_found` contents for all the pages that target the proxy.

I see two issues:

First, if the template is ignored (as it is in the example) the condition in `process_request` in `base.rb` 404's the page. I've switched

return not_found if sitemap_page.ignored?

to

return not_found if sitemap_page.ignored? && !sitemap_page.template?

but I'm not confident this is right.

Second: the block for setting variables isn't getting executed (and thus aren't getting passed to the template.) Still trying to track that down ...