change to contentlayer2 and update dependencies

This commit is contained in:
Timothy Lin
2024-03-31 21:45:41 +08:00
parent 2aa47049e6
commit 8db1ff3765
5 changed files with 3394 additions and 3636 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
import { defineDocumentType, ComputedFields, makeSource } from 'contentlayer/source-files'
import { defineDocumentType, ComputedFields, makeSource } from 'contentlayer2/source-files'
import { writeFileSync } from 'fs'
import readingTime from 'reading-time'
import { slug } from 'github-slugger'
@@ -134,6 +134,7 @@ export default makeSource({
mdx: {
cwd: process.cwd(),
remarkPlugins: [
// @ts-ignore
remarkExtractFrontmatter,
remarkGfm,
remarkCodeTitles,