A modern, dynamic personal blog website built with Next.js and Sanity.io by Manish Tamang.
This project demonstrates a full-featured blog platform built using modern web technologies. It's based on reverse engineering an existing template to explore Next.js' App Router capabilities. The blog showcases posts from various authors (friends' images used as placeholders) and implements best practices in web development.
- Modern Stack: Built with Next.js, React, and Tailwind CSS
- Content Management: Powered by Sanity.io headless CMS
- Responsive Design: Optimized for all devices
- SEO Optimized: Built-in SEO capabilities
- Smart Pagination: Using SWR for efficient data loading
- Theme Options: Light and dark mode support
- Contact Form: Integrated with web3forms
- Dynamic OG Images: Automated Open Graph image generation
- Next.js (v13.4.12)
- React (v18.2.0)
- Tailwind CSS (v3.3.1)
- react-icons (Latest)
- Sanity.io (v3.9.0)
- Node.js (v18.16.0)
- TypeScript (v5.0.4)
- SWR (Latest)
- vercel/og
- clsx
- date-fns
- next-themes
├── app/ # Next.js application directory
│ ├── (sanity)/ # Sanity Studio routes
│ ├── (website)/ # Main website routes
│ ├── api/ # API routes
│ └── providers.jsx # Theme provider
├── components/ # React components
├── lib/ # Library files
├── public/ # Static assets
└── styles/ # CSS files
- Clone the Repository
git clone https://github.com/Manish-Tamang/Blog.git
cd Blog
- Install Dependencies
npm install
- Set Up Environment Variables
Create
.env
file:
NEXT_PUBLIC_SANITY_PROJECT_ID=your_project_id
NEXT_PUBLIC_SANITY_DATASET=production
NEXT_PUBLIC_SANITY_API_VERSION=2023-03-25
SANITY_REVALIDATE_SECRET=your_preview_secret
- Start Sanity Studio
npm run sanity
- Launch Development Server
npm run dev
Visit http://localhost:3000
for the blog and http://localhost:3000/studio
for Sanity Studio.
-
Content Management
- Access Sanity Studio at
/studio
- Create and manage blog posts
- Add and edit author profiles
- Access Sanity Studio at
-
Customization
- Modify content through Sanity Studio
- Customize codebase as needed
- Update styling using Tailwind CSS
Ready for deployment on Vercel or Netlify:
- Create a GitHub repository
- Push your code
- Connect with your preferred hosting platform
- Configure environment variables
- Deploy!
Created with ❤️ by Manish Tamang