summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/getPosts.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getPosts.ts b/lib/getPosts.ts
index a8b4fe9..058d96d 100644
--- a/lib/getPosts.ts
+++ b/lib/getPosts.ts
@@ -10,7 +10,7 @@ function getPosts(path: string): Array<Post> {
       const days = readDir(`${path}/${year}/${month}`).reverse();
       days.forEach((day: string) => {
         let files = readDir(`${path}/${year}/${month}/${day}`).reverse();
-        files = files.filter((file: string) => file.substr(file.length - 2) === "md");
+        files = files.filter((file: string) => file.substr(file.length - 3) === ".md");
         files.forEach((file: string) => {
           const fsRoute = `${path}/${year}/${month}/${day}/${file}`;
           try {