docs: function buildCollection(collectionObj, options) {
    const items = buildPatterns(collectionObj, options);
    const pseudoFile = { path: collectionPath(items) };
    return readFiles(collectionGlob(items), options).then(collData => {
      const collectionMeta = collData.length ? collData[0].contents : {};
      collectionObj.collection = Object.assign(
        {
          name: titleCase(collectionKey(items)),
          resourceType: options.keys.collections.singular,
          id: resourceId(
            pseudoFile,
            options.src.patterns.basedir,
            options.keys.collections.plural
          )
        },
        collectionMeta
      );
      checkNamespaceCollision(
        ['items', 'patterns'],
        collectionObj.collection,
        `Collection ${collectionObj.collection.name}`,
        options
      );
      collectionObj.collection.items = items;
      collectionObj.collection.patterns = buildOrderedPatterns(
        collectionObj.collection
      );
      return collectionObj;
    });
  }