import * as utils from '../utils';
import * as parseUtils from './utils';

function parsePages (options) {
  const pageData = {};

  return utils.readFiles(options.src.pages, options).then(fileData => {
    const relativeRoot = utils.commonRoot(fileData);
    fileData.forEach(pageFile => {
      const entryKey   = utils.keyname(pageFile.path, { stripNumbers: false });
      const keys       = utils.relativePathArray(
        pageFile.path, relativeRoot);
      utils.deepObj(keys, pageData)[entryKey] = parseUtils
        .parseLocalData(pageFile, options);
    });
    return pageData;
  });
}

export default parsePages;

@@ -288,88 +288,8 @@
 %3E %7B%0A
-      const entryKey   = utils.keyname(pageFile.path, %7B stripNumbers: false %7D);%0A
     
@@ -412,16 +412,35 @@
 ta)%5B
-entryKey
+utils.resourceKey(pageFile)
 %5D = 

Tweak parse/pages for new utils.resourceKey