fix: compute reading time from post content not title

This commit is contained in:
2026-06-01 21:25:57 -05:00
parent 648055f405
commit 34525ffd83

View File

@@ -6,7 +6,7 @@ import remarkGfm from 'remark-gfm'
import rehypePrettyCode from 'rehype-pretty-code'
import rehypeKatex from 'rehype-katex'
import rehypeSlug from 'rehype-slug'
import { getPosts, getPost, getReadingTime } from '@/lib/posts'
import { getPosts, getPost } from '@/lib/posts'
import { TableOfContents } from '@/components/blog/TableOfContents'
import { ScrollToTop } from '@/components/ui/ScrollToTop'
import { ReadingProgress } from '@/components/ui/ReadingProgress'
@@ -45,7 +45,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
{post.title}
</h1>
<p className="font-mono text-xs text-ink-soft">
{getReadingTime(post.title)} min read
{post.readingTime} min read
</p>
</header>
<div className="prose prose-lg max-w-none">