nl_tokens: Generate a menu based on the file names in the pages dir index . [ md|json ] is called Home
pl_tokens: async function generateMenu ( ) { try { const <mask> = 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 ; } }