Skip to content

Commit 38a2e1e

Browse files
committed
Removed unused functions
1 parent 9af3692 commit 38a2e1e

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/pages/blog/index.astro

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,9 @@ const orderedPosts = nonDraftPosts.sort((a, b) => {
99
const bDate = new Date(b.frontmatter.pubDate);
1010
return bDate.valueOf() - aDate.valueOf();
1111
});
12-
const postsWithReadingTime = orderedPosts.map((post) => {
13-
const wordCount = post.rawContent().split(" ").length;
14-
const readingTime = Math.ceil(wordCount / 200);
15-
return {
16-
...post,
17-
readingTime,
18-
};
19-
});
2012
---
2113

2214
<BaseLayout title="Milán Herke - Blog">
2315
<Navbar />
24-
{postsWithReadingTime.map((post) => <BlogPostCard post={post} />)}
16+
{orderedPosts.map((post) => <BlogPostCard post={post} />)}
2517
</BaseLayout>

0 commit comments

Comments
 (0)