Skip to content

Commit ce77ced

Browse files
09473ZHclaude
andcommitted
Remove reading-time dependency
Field was unused in UI; removed from types, lib, and package.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a49157f commit ce77ced

4 files changed

Lines changed: 0 additions & 14 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"next-themes": "^0.4.4",
2626
"react": "^19.0.0",
2727
"react-dom": "^19.0.0",
28-
"reading-time": "^1.5.0",
2928
"rehype-autolink-headings": "^7.1.0",
3029
"rehype-pretty-code": "^0.14.0",
3130
"rehype-slug": "^6.0.0",

pnpm-lock.yaml

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/posts.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import fs from 'fs'
22
import path from 'path'
33
import matter from 'gray-matter'
4-
import readingTime from 'reading-time'
54
import GithubSlugger from 'github-slugger'
65
import type { Post, PostMeta, PostFrontmatter, TOCItem } from '@/types'
76

@@ -51,7 +50,6 @@ export function getPostMeta(type: 'article' | 'weekly', slug: string): PostMeta
5150
slug,
5251
type,
5352
frontmatter,
54-
readingTime: readingTime(content).text,
5553
}
5654
}
5755

@@ -113,6 +111,5 @@ export function getPost(type: 'article' | 'weekly', slug: string): Post | null {
113111
type,
114112
frontmatter,
115113
rawContent: content,
116-
readingTime: readingTime(content).text,
117114
}
118115
}

src/types/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ export interface Post {
1515
type: 'article' | 'weekly'
1616
frontmatter: PostFrontmatter
1717
rawContent: string
18-
readingTime: string
1918
}
2019

2120
export interface PostMeta {
2221
slug: string
2322
type: 'article' | 'weekly'
2423
frontmatter: PostFrontmatter
25-
readingTime: string
2624
}
2725

2826
export interface BookFrontmatter {

0 commit comments

Comments
 (0)