src/generate.js
async function generateMenu() {
  try {
    const files = await fs.readdir(source);
    const filter = files.filter(file => file.substring(0, file.lastIndexOf('.')) !== 'index');
    const menu = filter.map(file => ({
      title: file.substring(0, file.lastIndexOf('.')),
      url  : file.substring(0, file.lastIndexOf('.')),
    }));
    menu.unshift({ title: 'Home', url: '' });
    return menu;
  } catch (err) {
    throw err;
  }
}
async function generateMenu() {
  try {
    const files = await fs.readdir(source);
    const filter = files.filter(file => file.substring(0, file.lastIndexOf('.')) !== 'index');
    const menu = filter.map(file => ({
      title: file.substring(0, file.lastIndexOf('.')),
      url  : file.substring(0, file.lastIndexOf('.')),
    }));
    menu.unshift({ title: 'Home', url: '' });
    return menu;
  } catch (err) {
    throw err;
  }
}
Generate a menu based on the file names in the pages dir
index.[md|json] is called Home
@return {PromiseLikeArray.{ title: string, url: string }}