We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9af3692 commit 38a2e1eCopy full SHA for 38a2e1e
1 file changed
src/pages/blog/index.astro
@@ -9,17 +9,9 @@ const orderedPosts = nonDraftPosts.sort((a, b) => {
9
const bDate = new Date(b.frontmatter.pubDate);
10
return bDate.valueOf() - aDate.valueOf();
11
});
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
-});
20
---
21
22
<BaseLayout title="Milán Herke - Blog">
23
<Navbar />
24
- {postsWithReadingTime.map((post) => <BlogPostCard post={post} />)}
+ {orderedPosts.map((post) => <BlogPostCard post={post} />)}
25
</BaseLayout>
0 commit comments