From 49e82e812812ba75175d98173379d2e416e17b8f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Mon, 14 Oct 2019 09:47:28 +0200 Subject: Add getPost --- lib/parsePost.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/parsePost.ts') diff --git a/lib/parsePost.ts b/lib/parsePost.ts index 01e8d1c..416dd16 100644 --- a/lib/parsePost.ts +++ b/lib/parsePost.ts @@ -29,7 +29,7 @@ function getPostContent(fileContent: string): PostContent { }; } -export default function parsePost(filePath: string): Post { +export function parsePost(filePath: string): Post { const [year, month, day, title] = filePath.split("/").splice(-4, 4); const date = { year, month, day }; const fileContent = fs.readFileSync(filePath, "utf-8"); -- cgit 1.4.1