import fs from 'fs' import path from 'path' import matter from 'gray-matter' const postsDirectory = path.join(process.cwd(),'posts') //https://nodejs.org/api/path.html#path_path_join_paths //https://nodejs.org/api/process.html#process_process_cwd export function getSortedPostsData(){ //get filename under /posts //https://nodejs.org/api/fs.html#fs_fs_readdirsync_path_options const fileNames = fs...