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

Use velite instead of contentlayer #38

Merged
merged 13 commits into from
Mar 20, 2024
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

# contentlayer
.contentlayer
# velite
.velite
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- **Database**: [PlanetScale](https://planetscale.com/)
- **ORM**: [Prisma](https://www.prisma.io/)
- **Deployment**: [Vercel](https://vercel.com/)
- **Content Management**: [Contentlayer](https://www.contentlayer.dev/)
- **Content Management**: [Velite](https://velite.js.org/)

## 📁 Project Structure
```
Expand Down
1 change: 1 addition & 0 deletions content/blog/learning-and-inspiration/index.en.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 'My Personal Website: A Journey of Learning and Inspiration'
slug: 'learning-and-inspiration'
description: 'Learning and Inspiration of Creating a Personal Website.'
publishedAt: 2024-01-10
language: 'en'
Expand Down
1 change: 1 addition & 0 deletions content/blog/learning-and-inspiration/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: '我的個人網站:一趟學習和靈感的旅程'
slug: 'learning-and-inspiration'
description: '製作個人網站的學習與啟發.'
publishedAt: 2024-01-10
language: 'zh-TW'
Expand Down
1 change: 1 addition & 0 deletions content/pages/about/index.en.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
slug: 'about'
language: 'en'
---

Expand Down
1 change: 1 addition & 0 deletions content/pages/about/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
slug: 'about'
language: zh-TW
---

Expand Down
1 change: 1 addition & 0 deletions content/projects/personal-website/index.en.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Personal Website
slug: personal-website
description: My personal website built with TypeScript, Next.js 14, and Tailwind CSS.
imageUrl: '/projects/personal-website.jpg'
repoName: 'jinrup.dev'
Expand Down
1 change: 1 addition & 0 deletions content/projects/personal-website/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: 個人網站
slug: 'personal-website'
description: 使用 TypeScript、Next.js 14 和 Tailwind CSS 建構的個人網站。
imageUrl: '/projects/personal-website.jpg'
repoName: 'jinrup.dev'
Expand Down
123 changes: 0 additions & 123 deletions contentlayer.config.ts

This file was deleted.

3 changes: 1 addition & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const { withContentlayer } = require('next-contentlayer');
const withNextIntl = require('next-intl/plugin')();

/** @type {import('next').NextConfig} */
const nextConfig = {
swcMinify: true,
};

module.exports = withNextIntl(withContentlayer(nextConfig));
module.exports = withNextIntl(nextConfig);
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,19 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "prisma generate && next build",
"dev": "pnpm velite --watch & next dev",
"build": "prisma generate && pnpm velite build && next build",
"start": "next start",
"lint": "next lint"
},
"overrides": {
"next-contentlayer": {
"next": "$next"
}
},
"dependencies": {
"@giscus/react": "^2.3.0",
"@mdx-js/react": "^3.0.1",
"@prisma/client": "^4.15.0",
"clsx": "^1.2.1",
"contentlayer": "^0.3.2",
"date-fns": "^2.30.0",
"framer-motion": "^10.12.12",
"next": "^14.0.1",
"next-contentlayer": "^0.3.2",
"next-intl": "^3.2.4",
"octokit": "^3.1.2",
"react": "18.2.0",
Expand Down Expand Up @@ -54,6 +47,7 @@
"prisma": "^4.15.0",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.2",
"typescript": "5.0.4"
"typescript": "5.0.4",
"velite": "0.1.0-beta.12"
}
}
Loading