Skip to content

Commit d2620cc

Browse files
committed
chore: edit contentlayer config
1 parent b4557a8 commit d2620cc

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

contentlayer.config.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { defineDocumentType, FieldDefs, makeSource } from 'contentlayer/source-files';
2-
import readingTime from 'reading-time';
32
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
43
import rehypeExternalLinks from 'rehype-external-links';
54
import rehypePrism from 'rehype-prism-plus';
@@ -9,12 +8,8 @@ import remarkGfm from 'remark-gfm';
98

109
const fields: FieldDefs = {
1110
title: { type: 'string', required: true },
12-
description: { type: 'string', required: true },
1311
date: { type: 'date', required: true },
14-
tags: { type: 'list', required: true, of: { type: 'string' } },
1512
draft: { type: 'boolean' },
16-
image: { type: 'string' },
17-
icon: { type: 'string' },
1813
};
1914

2015
export const Post = defineDocumentType(() => ({
@@ -27,14 +22,6 @@ export const Post = defineDocumentType(() => ({
2722
type: 'string',
2823
resolve: (post) => `/${post._raw.flattenedPath}`,
2924
},
30-
readingMinutes: {
31-
type: 'string',
32-
resolve: (post) => Math.ceil(readingTime(post.body.raw).minutes),
33-
},
34-
wordCount: {
35-
type: 'number',
36-
resolve: (post) => post.body.raw.split(/\s+/gu).length,
37-
},
3825
},
3926
}));
4027

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"postcss": "^8",
3636
"prettier": "^3.3.3",
3737
"prettier-plugin-tailwindcss": "^0.6.8",
38-
"reading-time": "^1.5.0",
3938
"rehype-autolink-headings": "^7.1.0",
4039
"rehype-external-links": "^3.0.0",
4140
"rehype-prism-plus": "^2.0.0",

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5186,11 +5186,6 @@ readdirp@~3.6.0:
51865186
dependencies:
51875187
picomatch "^2.2.1"
51885188

5189-
reading-time@^1.5.0:
5190-
version "1.5.0"
5191-
resolved "https://registry.yarnpkg.com/reading-time/-/reading-time-1.5.0.tgz#d2a7f1b6057cb2e169beaf87113cc3411b5bc5bb"
5192-
integrity sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==
5193-
51945189
reflect.getprototypeof@^1.0.4:
51955190
version "1.0.6"
51965191
resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859"

0 commit comments

Comments
 (0)