Directory Indexes with middleman-blog
Middleman is a static site generator built in Ruby, you can check it out here.
I was having trouble with it's blogging section middleman-blog last night where directory indexes worked for content, but not for blog posts and categories.
For example, middleman build
was giving me this tree:
/index.html
/articles/index.html
/about/index.html
/articles/blog_post
/articles/tags/ruby
You see the regular content was generating indexes, but the last few were actually being saved without extensions. I thought this was a bug, but it's just a configuration error. Turns out that I had done this in config.rb:
activate :directory_indexes
activate :blog do
...
end
Well, that's backwards. You have to do it like this:
activate :blog do
...
end
activate :directory_indexes
Hope that saves someone else some time
Written by Josh Lewis
Related protips
1 Response
Thank you!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#