Add 'partials' function to render collections and option to cache templates