assemble/assemble — pull request #581 by IanMercer (2014-10-20 03:18:44+00:00)
Title: Fix sortby and sortorder options for collections

Prior to this change it was not possible to set the sort order of a collection.

In the code it used to use `_union` to merge options passed in by the user and the default options for 'pages', 'tags' and 'categories'. Since `_union` doesn't compare by name this was not working. The mixture of strings and objects in collections before calling normalize was also slightly 'unusual'.

With this change you can now add something like this to options:

collections : [ {name: 'pages', sortby:'order', sortorder:'ASC' } ]`

And thus sort your pages by a field called 'order' instead of 'name'.