Skip to content

Commit

Permalink
Merge pull request #1023 from timlrx/fix/contentlayer-toc-type
Browse files Browse the repository at this point in the history
Fix contentlayer toc type
  • Loading branch information
timlrx authored Sep 12, 2024
2 parents 142c14c + c8c0d9c commit 250a4c5
Show file tree
Hide file tree
Showing 3 changed files with 2,087 additions and 1,598 deletions.
2 changes: 1 addition & 1 deletion contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const computedFields: ComputedFields = {
type: 'string',
resolve: (doc) => doc._raw.sourceFilePath,
},
toc: { type: 'string', resolve: (doc) => extractTocHeadings(doc.body.raw) },
toc: { type: 'json', resolve: (doc) => extractTocHeadings(doc.body.raw) },
}

/**
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"@tailwindcss/typography": "^0.5.12",
"autoprefixer": "^10.4.13",
"body-scroll-lock": "^4.0.0-beta.0",
"contentlayer2": "0.4.6",
"contentlayer2": "0.5.1",
"esbuild": "0.20.2",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.2",
"hast-util-from-html-isomorphic": "^2.0.0",
"image-size": "1.0.0",
"next": "14.2.3",
"next-contentlayer2": "0.4.6",
"next-contentlayer2": "0.5.1",
"next-themes": "^0.3.0",
"pliny": "0.2.1",
"postcss": "^8.4.24",
Expand Down
Loading

0 comments on commit 250a4c5

Please sign in to comment.