Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate: #SHA-23 to contentlayer2 #33

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contentlayer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
defineDocumentType,
defineNestedType,
makeSource,
} from "@contentlayer-temp/source-files";
} from "@contentlayer2/source-files";
import rehypePrettyCode from "rehype-pretty-code";
import rehypeSlug from "rehype-slug";
import { codeImport } from "remark-code-import";
Expand All @@ -11,7 +11,7 @@ import { visit } from "unist-util-visit";
import { rehypeComponent } from "./src/lib/rehype-component";
import { rehypeNpmCommand } from "./src/lib/rehype-installation-command";

/** @type {import('@contentlayer-temp/source-files').ComputedFields} */
/** @type {import('@contentlayer2/source-files').ComputedFields} */
const computedFields = {
slug: {
type: "string",
Expand Down
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createContentlayerPlugin } from "next-contentlayer-temp";
import { createContentlayerPlugin } from "next-contentlayer2";

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down
138 changes: 69 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"private": true,
"scripts": {
"dev": "next dev --turbo",
"build": "contentlayer-temp build && npm run build:registry && next build",
"build": "contentlayer2 build && npm run build:registry && next build",
"start": "next start",
"lint": "next lint",
"build:test": "npm run typecheck && npm run build:registry && next build && next start -p 3001",
"build:registry": "npx tsx --tsconfig ./src/script/tsconfig.scripts.json ./src/script/registry-builder.ts",
"typecheck": "contentlayer-temp build && tsc --noEmit",
"typecheck": "contentlayer2 build && tsc --noEmit",
"format": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache"
},
"dependencies": {
Expand All @@ -34,7 +34,7 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"cmdk": "^0.2.1",
"contentlayer-temp": "^0.4.4",
"contentlayer2": "^0.4.4",
"date-fns": "^3.3.1",
"embla-carousel": "^8.0.1",
"embla-carousel-auto-scroll": "^8.0.1",
Expand All @@ -45,7 +45,7 @@
"mdast-util-toc": "^7.0.0",
"mini-svg-data-uri": "^1.4.4",
"next": "^14.1.2",
"next-contentlayer-temp": "^0.4.4",
"next-contentlayer2": "^0.4.4",
"next-themes": "^0.2.1",
"posthog-js": "^1.116.5",
"react": "^18",
Expand Down
2 changes: 1 addition & 1 deletion src/components/mdx-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as React from "react";
import Image from "next/image";
import Link from "next/link";
import { useMDXComponent } from "next-contentlayer-temp/hooks";
import { useMDXComponent } from "next-contentlayer2/hooks";
import { NpmCommands } from "../types/unist";
import { Event } from "@/lib/events";
import { cn } from "@/lib/utils";
Expand Down