mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
fix: update dependencies to latest
This commit is contained in:
@ -38,6 +38,9 @@ export const getPosts = async (): Promise<PostMetadata[]> => {
|
||||
const postsWithTime = await Promise.all(
|
||||
posts.map(async (postFilename) => {
|
||||
const [slug, extension] = postFilename.split('.')
|
||||
if (slug == null || extension == null) {
|
||||
throw new Error('Invalid postFilename.')
|
||||
}
|
||||
const blogPostPath = path.join(POSTS_PATH, `${slug}.${extension}`)
|
||||
const blogPostContent = await fs.promises.readFile(blogPostPath, {
|
||||
encoding: 'utf8'
|
||||
|
Reference in New Issue
Block a user