Filter non md files
This commit is contained in:
parent
8cf973be70
commit
f6fef99648
|
@ -3,4 +3,5 @@ npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
build
|
build
|
||||||
public
|
public
|
||||||
|
content
|
||||||
.git
|
.git
|
||||||
|
|
|
@ -103,7 +103,10 @@ export class Scanner {
|
||||||
.then(
|
.then(
|
||||||
(files) => {
|
(files) => {
|
||||||
const filtered = files.filter(
|
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))
|
return Promise.all(filtered.map(this.readfile))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue