   ###
 
   get_all_content = (types) ->
-    locals = {}
-    W.map(types, (t) ->
+    W.reduce types, (m, t) ->
       fetch_content(t)
         .then(format_content)
-        .then (c) -> locals[t.name] = c
-    ).yield(locals)
+        .then((c) -> m[t.name] = c)
+        .yield(m)
+    , {}
 
   ###*
    * Fetch entries for a single content type object

      before_pass: (ctx) =>
        # once content is loaded, pass contentful data into locals
        promise.then (locals) =>
          return if @roots.config.locals.contentful
          @roots.config.locals.contentful = locals


  configure_content = (types) ->
    W.map types, (t) ->
      if not t.id then W.reject(errors.no_type_id)
      if t.name then return W.resolve()

      t.filters ?= {}
      W client.contentType(t.id).then (res) ->
        t.name = pluralize(S(res.name).toLowerCase().underscore().s)
        return t

