General purpose pagination for Middleman.