Skip to content

Commit

Permalink
fix: contentlayer build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchernchong committed Nov 29, 2024
1 parent 5a2f300 commit 9fac2a4
Show file tree
Hide file tree
Showing 6 changed files with 1,201 additions and 1,179 deletions.
2 changes: 1 addition & 1 deletion components/Mdx.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link";
import Image from "next/image";
import { useMDXComponent } from "next-contentlayer/hooks";
import { useMDXComponent } from "next-contentlayer2/hooks";
import type { MDXComponents } from "mdx/types";
import { ArrowUpRightIcon } from "@heroicons/react/16/solid";
import { Typography } from "@/components/Typography";
Expand Down
18 changes: 9 additions & 9 deletions contentlayer.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import { defineDocumentType, makeSource } from "contentlayer2/source-files";
import type { BlogPosting, WithContext } from "schema-dts";
import { BASE_URL } from "./config";
import readingTime from "reading-time";
Expand Down Expand Up @@ -54,7 +54,7 @@ export const Post = defineDocumentType(() => ({
name: "Ru Chern Chong",
url: BASE_URL,
},
} satisfies WithContext<BlogPosting>),
}) satisfies WithContext<BlogPosting>,
},
url: {
type: "string",
Expand Down Expand Up @@ -102,7 +102,7 @@ export const Journal = defineDocumentType(() => ({
name: "Ru Chern Chong",
url: BASE_URL,
},
} satisfies WithContext<BlogPosting>),
}) satisfies WithContext<BlogPosting>,
},
url: {
type: "string",
Expand All @@ -118,12 +118,12 @@ export default makeSource({
remarkPlugins: [remarkGfm, remarkUnwrapImages],
rehypePlugins: [
rehypeSlug,
[
rehypePrettyCode,
{
theme: "github-dark-dimmed",
} satisfies PrettyCodeOptions,
],
// [
// rehypePrettyCode,
// {
// theme: "github-dark-dimmed",
// } satisfies PrettyCodeOptions,
// ],
[
rehypeAutolinkHeadings,
{
Expand Down
2 changes: 1 addition & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextConfig } from "next";
import { withContentlayer } from "next-contentlayer";
import { withContentlayer } from "next-contentlayer2";

const nextConfig: NextConfig = {
reactStrictMode: true,
Expand Down
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.4.2",
"private": true,
"scripts": {
"dev": "next dev --turbo",
"build": "next build",
"dev": "contentlayer2 dev & next dev --turbo",
"build": "contentlayer2 build && next build",
"start": "next start",
"lint": "next lint",
"semantic-release": "semantic-release",
Expand All @@ -20,20 +20,21 @@
"@vercel/og": "^0.0.27",
"@vercel/speed-insights": "^1.0.9",
"classnames": "^2.3.2",
"contentlayer": "^0.3.4",
"contentlayer2": "^0.5.3",
"date-fns": "^4.1.0",
"eslint": "8.31.0",
"eslint-config-next": "13.4.2",
"graphql": "^16.8.1",
"mdx-bundler": "^10.0.3",
"next": "^15.0.2",
"next-contentlayer": "^0.3.4",
"react": "19.0.0-rc-603e6108-20241029",
"react-dom": "19.0.0-rc-603e6108-20241029",
"next-contentlayer2": "^0.5.3",
"react": "19.0.0-rc.1",
"react-dom": "19.0.0-rc.1",
"reading-time": "^1.5.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-pretty-code": "^0.10.2",
"rehype-slug": "^5.1.0",
"remark-gfm": "^3.0.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-pretty-code": "^0.14.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"remark-unwrap-images": "^4.0.0",
"rss": "^1.2.2",
"schema-dts": "^1.1.2",
Expand All @@ -52,8 +53,8 @@
"@tailwindcss/typography": "^0.5.8",
"@types/mdx": "^2.0.11",
"@types/node": "^20.17.0",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@types/rss": "^0.0.32",
"@types/ws": "^8.5.12",
"autoprefixer": "^10.4.13",
Expand Down
Loading

0 comments on commit 9fac2a4

Please sign in to comment.