Filter non md files
This commit is contained in:
parent
8cf973be70
commit
f6fef99648
|
@ -3,4 +3,5 @@ npm-debug.log
|
|||
yarn-error.log
|
||||
build
|
||||
public
|
||||
content
|
||||
.git
|
||||
|
|
|
@ -103,7 +103,10 @@ export class Scanner {
|
|||
.then(
|
||||
(files) => {
|
||||
const filtered = files.filter(
|
||||
(file) => fs.statSync(path.join(process.cwd(), config.contentPath, file)).isFile()
|
||||
(file) => (
|
||||
fs.statSync(path.join(process.cwd(), config.contentPath, file)).isFile() &&
|
||||
path.extname(file) == '.md'
|
||||
)
|
||||
)
|
||||
return Promise.all(filtered.map(this.readfile))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue