function findPageForPath (pages, path) {
  for (let i = 0; i < pages.length; i++) {
    const page = pages[i]
    if (page.path.toLowerCase() === path.toLowerCase()) {
      return page
    }
  }
  return {
    path: '',
    frontmatter: {}
  }
}
Get page data via path (permalink).

@param {array} pages
@param {string} path
@returns {object}