1
1
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:
Divlo
2023-01-10 23:56:46 +01:00
parent d76db36dbc
commit 042a861f58
17 changed files with 1761 additions and 19431 deletions

View File

@ -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'