This is a responsive personal blog application built with React and Vite, designed for easy content management and GitHub Pages deployment. The blog features a clean, modern interface with search functionality, responsive design, and Markdown content support.
- 📱 Responsive Design: Optimized for mobile, tablet, and desktop viewing
- 🔍 Search Functionality: Filter blog posts by keywords
- ✨ Modern UI: Clean, professional interface with animations and transitions
- 📝 Markdown Support: Write blog posts in Markdown with frontmatter metadata
- 🖼️ Image Optimization: Lazy-loading images for improved performance
- 🔄 GitHub Actions: Automated deployment to GitHub Pages
- 🔗 Social Sharing: Built-in sharing functionality for blog posts
- 🧩 Component-Based Architecture: Modular and maintainable code structure
- Framework: React 18
- Build Tool: Vite
- Routing: React Router DOM
- Styling: CSS with responsive design
- Content: Markdown with gray-matter for frontmatter parsing
- Deployment: GitHub Pages via GitHub Actions
- Node.js (LTS version recommended)
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/testing-react.git cd testing-react -
Install dependencies:
npm install -
Start the development server:
npm start -
Open http://localhost:3000 to view it in your browser.
Create new Markdown files in the src/data/posts/ directory with the following frontmatter format:
---
id: 5
title: Your Blog Post Title
description: A brief description of the post
publishedDate: 2025-03-02
image: your-image.jpg
keywords:
- keyword1
- keyword2
---
# Your Blog Post Title
Your content goes here...Images should be placed in the public directory.
This project is configured to deploy to GitHub Pages using GitHub Actions. When you push changes to the main branch, the workflow will automatically build and deploy the application.
To set up deployment:
- Ensure your repository is configured to use GitHub Pages
- Update the
homepagefield inpackage.jsonwith your GitHub Pages URL - Push changes to the
mainbranch
This repository is configured for GitHub Codespaces, providing a complete development environment in the cloud:
- Click on the "Code" button on the repository page
- Select "Open with Codespaces"
- Create a new codespace or use an existing one
The development server will start automatically, and all necessary extensions will be pre-installed.
testing-react/
├── .devcontainer/ # Codespaces configuration
├── .github/ # GitHub Actions workflows
├── public/ # Static assets and images
├── src/
│ ├── components/ # Reusable UI components
│ ├── data/ # Blog post content (Markdown files)
│ ├── pages/ # Page components
│ ├── utils/ # Utility functions
│ ├── App.jsx # Main application component
│ └── index.jsx # Application entry point
└── vite.config.js # Vite configuration
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
