Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
fix: switch to contentlayer2
Browse files Browse the repository at this point in the history
  • Loading branch information
kjxbyz committed Jul 25, 2024
1 parent 75b2590 commit 3d5615f
Show file tree
Hide file tree
Showing 13 changed files with 879 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ jobs:
- name: install dependencies
run: pnpm install

- name: copy files to @contentlayer/source-files
- name: copy files to @contentlayer2/source-files
if: matrix.settings.platform == 'windows-latest'
run: |
copy fixed_pkg\makeCacheItemFromFilePath.js node_modules\.pnpm\node_modules\@contentlayer\source-files\dist\fetchData\makeCacheItemFromFilePath.js
copy fixed_pkg\makeCacheItemFromFilePath.js node_modules\.pnpm\node_modules\@contentlayer2\source-files\dist\fetchData\makeCacheItemFromFilePath.js
- name: import windows certificate
if: matrix.settings.platform == 'windows-latest'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
- name: install dependencies
run: pnpm install

- name: copy files to @contentlayer/source-files
- name: copy files to @contentlayer2/source-files
if: matrix.platforms == 'windows-latest'
run: |
copy fixed_pkg\makeCacheItemFromFilePath.js node_modules\.pnpm\node_modules\@contentlayer\source-files\dist\fetchData\makeCacheItemFromFilePath.js
copy fixed_pkg\makeCacheItemFromFilePath.js node_modules\.pnpm\node_modules\@contentlayer2\source-files\dist\fetchData\makeCacheItemFromFilePath.js
- name: build app
run: pnpm build:app
4 changes: 2 additions & 2 deletions .github/workflows/test-code-signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:
- name: install dependencies
run: pnpm install

- name: copy files to @contentlayer/source-files
- name: copy files to @contentlayer2/source-files
if: matrix.settings.platform == 'windows-latest'
run: |
copy fixed_pkg\makeCacheItemFromFilePath.js node_modules\.pnpm\node_modules\@contentlayer\source-files\dist\fetchData\makeCacheItemFromFilePath.js
copy fixed_pkg\makeCacheItemFromFilePath.js node_modules\.pnpm\node_modules\@contentlayer2\source-files\dist\fetchData\makeCacheItemFromFilePath.js
- name: import windows certificate
if: matrix.settings.platform == 'windows-latest'
Expand Down
2 changes: 1 addition & 1 deletion app/components/mdx/mdx.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMDXComponent } from "next-contentlayer/hooks";
import { useMDXComponent } from "next-contentlayer2/hooks";
import PostLink from "./link";
import PostImage from "./image";
import PostBanner from "./banner";
Expand Down
2 changes: 1 addition & 1 deletion app/contentlayer.config.js
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 rehypeSlug from "rehype-slug";

const Post = defineDocumentType(() => ({
Expand Down
2 changes: 1 addition & 1 deletion app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { withContentlayer } = require("next-contentlayer");
const { withContentlayer } = require("next-contentlayer2");

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"contentlayer": "^0.3.4",
"contentlayer2": "^0.5.0",
"date-fns": "^3.6.0",
"dayjs": "^1.11.11",
"focus-trap-react": "^10.2.3",
Expand All @@ -32,7 +32,7 @@
"ms": "^2.1.3",
"muse-ui": "^4.0.0-alpha.3",
"next": "14.2.5",
"next-contentlayer": "^0.3.4",
"next-contentlayer2": "^0.5.0",
"next-intl": "^3.17.1",
"next-themes": "^0.3.0",
"nextjs-toploader": "^1.6.12",
Expand Down Expand Up @@ -71,7 +71,7 @@
"prettier-plugin-tailwindcss": "^0.6.5",
"sort-package-json": "^2.10.0",
"tailwindcss": "^3.4.6",
"typescript": "^5.4.5"
"typescript": "5.4.5"
},
"engines": {
"node": "^18"
Expand Down
2 changes: 1 addition & 1 deletion docs/components/mdx/mdx.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMDXComponent } from "next-contentlayer/hooks";
import { useMDXComponent } from "next-contentlayer2/hooks";
import PostLink from "./link";
import PostImage from "./image";
import PostBanner from "./banner";
Expand Down
2 changes: 1 addition & 1 deletion docs/contentlayer.config.js
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 rehypeSlug from "rehype-slug";

const Post = defineDocumentType(() => ({
Expand Down
2 changes: 1 addition & 1 deletion docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { withContentlayer } = require("next-contentlayer");
const { withContentlayer } = require("next-contentlayer2");

const basePath =
process.env.NEXT_PUBLIC_VERCEL_ENV === "production" ? "/faforever" : "";
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"contentlayer": "^0.3.4",
"contentlayer2": "^0.5.0",
"date-fns": "^3.6.0",
"dayjs": "^1.11.11",
"focus-trap-react": "^10.2.3",
Expand All @@ -34,7 +34,7 @@
"ms": "^2.1.3",
"muse-ui": "^4.0.0-alpha.3",
"next": "14.2.5",
"next-contentlayer": "^0.3.4",
"next-contentlayer2": "^0.5.0",
"next-themes": "^0.3.0",
"nextjs-toploader": "^1.6.12",
"react": "18.3.1",
Expand Down
8 changes: 4 additions & 4 deletions fixed_pkg/makeCacheItemFromFilePath.js

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

Loading

0 comments on commit 3d5615f

Please sign in to comment.