diff options
Diffstat (limited to 'lib/parsePost.ts')
-rw-r--r-- | lib/parsePost.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |