upstream #1
| @@ -98,6 +98,10 @@ export async function getAllFilesFrontMatter(folder) { | ||||
|   files.forEach((file) => { | ||||
|     // Replace is needed to work on Windows | ||||
|     const fileName = file.slice(prefixPaths.length + 1).replace(/\\/g, '/') | ||||
|     // Remove Unexpected File | ||||
|     if (path.extname(fileName) !== '.md' && path.extname(fileName) !== '.mdx') { | ||||
|         return | ||||
|     } | ||||
|     const source = fs.readFileSync(file, 'utf8') | ||||
|     const { data } = matter(source) | ||||
|     if (data.draft !== true) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user