Sitemap/frontmatter/globbing fixes #313

merged 4 commits into from Mar 15, 2012

2 participants

Middleman member

These commits came out of a long, deep rabbit hole I went down while trying to get the blog extension's tests passing on Ruby 1.8.7. I don't actually know why they were failing, but somewhere in all the changes I made the blog extension worked again, and I had fixed a few things besides.

  • The frontmatter extension's ignore callback will no longer accidentally create entries in the sitemap.
  • The sitemap will no longer implicitly create pages if it's asked about a page it doesn't already have. Extensions and other code that wants to add things to the sitemap will have to use the new add method. Hopefully this will keep things more sane and reduce a class of bugs I've been tracking down for a while.
  • You can now disable directory indexes via page in config.rb with a regex or glob:
page "no_indexes*", :directory_index => false
  • You can now use regex/glob within with_layout and it'll work. Example:
with_layout :admin do
  page "admin_*.html"
Middleman member

Love this.

@tdreyno tdreyno merged commit d36077f into middleman:master Mar 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment