A modern, responsive blog application built with React and Vite. Features a clean design with dark/light theme support, blog post management, contact forms, and responsive navigation.
- Modern React Architecture: Built with React 19, React Router DOM for navigation
- Responsive Design: Mobile-first design with Tailwind CSS
- Blog Management: Full blog system with categories, tags, search, and filtering
- Contact System: Integrated contact form with EmailJS
- SEO Friendly: Proper meta tags and semantic HTML structure
- Performance Optimized: Fast loading with Vite build tool
- Accessibility: ARIA labels, keyboard navigation, and screen reader support
- Frontend: React 19.1.0
- Routing: React Router DOM 7.5.3
- Styling: Tailwind CSS 4.1.5
- Build Tool: Vite 6.3.5
- Email Service: EmailJS Browser 4.4.1
- Linting: ESLint 9.25.0
src/
├── components/
│ ├── blog/
│ │ ├── BlogCard.jsx
│ │ ├── BlogDetails.jsx
│ │ ├── BlogImageGallery.jsx
│ │ └── BlogList.jsx
│ ├── layout/
│ │ ├── Footer.jsx
│ │ ├── Header.jsx
│ │ └── Layout.jsx
│ └── ui/
│ ├── BackToTop.jsx
│ ├── Button.jsx
│ ├── Card.jsx
│ ├── Gallery.jsx
│ ├── ReadingProgressBar.jsx
│ └── TableOfContents.jsx
├── data/
│ └── blogs.js
├── pages/
│ ├── About.jsx
│ ├── Blog.jsx
│ ├── BlogPost.jsx
│ ├── Contact.jsx
│ └── Home.jsx
├── styles/
│ └── index.css
├── utils/
│ └── dateFormatter.js
├── App.jsx
└── main.jsx
- Node.js (version 16 or higher)
- npm or yarn package manager
- Clone the repository:
git clone <repository-url>
cd blog2
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:5173
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Run ESLint
To enable the contact form functionality, update the EmailJS configuration in src/pages/Contact.jsx
:
const response = await emailjs.send(
"YOUR_SERVICE_ID", // Replace with your EmailJS service ID
"YOUR_TEMPLATE_ID", // Replace with your EmailJS template ID
templateParams,
"YOUR_PUBLIC_KEY" // Replace with your EmailJS public key
);
-
Personal Information: Replace placeholder values in:
src/pages/About.jsx
- Personal bio and detailssrc/pages/Contact.jsx
- Contact informationsrc/components/layout/Header.jsx
- Site titlesrc/components/layout/Footer.jsx
- Copyright and social links
-
Blog Content: Edit
src/data/blogs.js
to add your own blog posts -
Styling: Customize colors and design in Tailwind CSS classes
Each blog post in src/data/blogs.js
contains:
{
id: 1,
slug: 'post-slug',
title: 'Post Title',
excerpt: 'Short description...',
coverImage: 'image-url',
author: {
name: 'Author Name',
avatar: 'avatar-url',
bio: 'Author bio...',
social: {
twitter: 'url',
github: 'url'
}
},
publishedDate: '2025-01-15T09:00:00Z',
updatedDate: null,
readTime: 8,
category: 'category-name',
tags: ['tag1', 'tag2'],
content: 'HTML content...'
}
- Search: Full-text search across titles, excerpts, categories, and tags
- Filtering: Filter by categories and tags
- Sorting: Sort by date (newest/oldest) or alphabetically
- Responsive Grid: Adaptive layout for different screen sizes
- Reading Progress: Progress bar for blog posts
- Table of Contents: Auto-generated for blog posts
- Back to Top: Smooth scroll functionality
- Header: Responsive navigation with mobile menu
- Footer: Site information and newsletter signup
- Layout: Main layout wrapper
- BlogCard: Individual blog post preview card
- BlogList: Grid layout for multiple blog posts
- BlogDetails: Full blog post view with reading features
- BlogImageGallery: Image gallery for blog posts
- Button: Reusable button component with variants
- Card: Generic card container
- Gallery: Image gallery component
- ReadingProgressBar: Progress indicator for long content
- TableOfContents: Navigation for blog sections
- BackToTop: Scroll-to-top functionality
- Home: Landing page with featured posts and categories
- Blog: Blog listing with search and filters
- BlogPost: Individual blog post view
- About: Personal/company information
- Contact: Contact form and information
npm run build
The built files will be in the dist/
directory.
- Build the project:
npm run build
- Upload the
dist/
folder to Netlify - Configure redirects in
netlify.toml
(already included)
npm run build
vercel --prod
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)