diff options
-rw-r--r-- | lib/getPosts.ts | 3 | ||||
-rw-r--r-- | package.json | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/getPosts.ts b/lib/getPosts.ts index 814f6d8..058d96d 100644 --- a/lib/getPosts.ts +++ b/lib/getPosts.ts @@ -9,7 +9,8 @@ function getPosts(path: string): Array<Post> { months.forEach((month: string) => { const days = readDir(`${path}/${year}/${month}`).reverse(); days.forEach((day: string) => { - const files = readDir(`${path}/${year}/${month}/${day}`).reverse(); + let files = readDir(`${path}/${year}/${month}/${day}`).reverse(); + files = files.filter((file: string) => file.substr(file.length - 3) === ".md"); files.forEach((file: string) => { const fsRoute = `${path}/${year}/${month}/${day}/${file}`; try { diff --git a/package.json b/package.json index b869077..1dfe621 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kronikarz", - "version": "2.0.1", + "version": "2.0.2", "description": "System elektronicznej kroniki", "main": "dist/index.js", "types": "dist/index.d.ts", |