Custom blog sort

Hi, I was wondering how does one custom sort a blog in middleman while still using the pages. I can use a custom sort on blog.articles, but this wont change the page_articles locale. Is there a clean way to do that?

Right now I have to replace page_articles with blog.articles.sort_by {|article| CUSTOM SORT HERE }[page_start-1…page_end-1]

Which is a bit ugly. Any idea?

It looks like there’s no nice way to do it right now. You could try monkey patching Middleman::Blog::BlogData#articles in the short term, but perhaps there should be a configuration option to the effect of:

activate :blog do |blog|
  blog.sort_articles_by = ->(article) { article.title.downcase }
end