docs: function findPage(pages, path) {
    const p = path.shift();
    const page = pages.find(page => page.path === p);
  
    if (!page) {
      return {redirect: getDefaultPath(pages)};
    }
    if (page.children) {
      const result = findPage(page.children, path);
      if (result.page) {
        return result;
      }
      return {redirect: [p].concat(result.redirect)};
    }
    if (path.length) {
      return {redirect: []};
    }
    return {page};
  }