This is a Next.js blog project, designed to be hosted on Vercel.
First, install dependencies:
npm installThen, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
This project is optimized for deployment on Vercel.
- Create a new repository on GitHub.
- Initialize this folder as a git repository (if it isn't already):
git init git add . git commit -m "Initial commit"
- Push your code to the GitHub repository:
git branch -M main git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git git push -u origin main
- Go to Vercel and sign up/log in.
- Click "Add New..." and select "Project".
- Select "Continue with GitHub".
- Find your repository in the list and click "Import".
- In the configuration screen:
- Framework Preset: Next.js (should be auto-detected).
- Root Directory: ./ (default).
- Build Command:
next build(default). - Output Directory:
.next(default). - Install Command:
npm install(default).
- Click "Deploy".
Vercel will build your project and deploy it. You will get a live URL (e.g., your-project.vercel.app).
Whenever you want to add a new post or change code:
- Make changes locally.
- Commit and push to GitHub:
git add . git commit -m "Add new post" git push
- Vercel will automatically detect the push and redeploy your site.