A modern, high-performance blogging platform built with Next.js and deployed on GitHub Pages.
- Modern Stack: Built with Next.js 14, React 18, and TypeScript
- Responsive Design: Mobile-first design with dark/light theme support
- SEO Optimized: Built-in SEO, sitemap generation, and structured data
- Fast Performance: Static site generation with optimal loading speeds
- Rich Content: Markdown support with syntax highlighting and table of contents
- Interactive Components: Search, filtering, and social sharing
- GitHub Pages Ready: Automated deployment with GitHub Actions
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Content: Markdown with gray-matter
- Icons: Lucide React
- Deployment: GitHub Pages with GitHub Actions
- Fonts: Inter & JetBrains Mono (Google Fonts)
βββ app/ # Next.js App Router
β βββ blog/ # Blog pages
β βββ about/ # About page
β βββ contact/ # Contact page
β βββ layout.tsx # Root layout
β βββ page.tsx # Homepage
β βββ globals.css # Global styles
βββ components/ # Reusable components
β βββ Header.tsx # Navigation header
β βββ Footer.tsx # Site footer
β βββ PostCard.tsx # Blog post card
β βββ SearchBar.tsx # Search functionality
β βββ ThemeProvider.tsx # Theme context
βββ content/ # Blog content
β βββ posts/ # Markdown blog posts
βββ lib/ # Utility functions
β βββ posts.ts # Post management
β βββ utils.ts # Helper functions
βββ public/ # Static assets
βββ .github/workflows/ # GitHub Actions
βββ next.config.js # Next.js configuration
βββ tailwind.config.js # Tailwind configuration
βββ package.json # Dependencies- Node.js 18+ and npm
- Git
- GitHub account
-
Clone the repository
git clone https://github.com/EdFazli/EdFazli.github.io.git cd EdFazli.github.io -
Install dependencies and setup
./setup.sh
-
Start development server
npm run dev
-
Open in browser
Visit http://localhost:3000
npm run build
npm run exportCreate new blog posts in the content/posts/ directory using this format:
---
title: "Your Post Title"
date: "2024-01-15"
excerpt: "Brief description of your post"
author: "Syed Fazli"
categories: ["Development", "React"]
tags: ["nextjs", "react", "tutorial"]
toc: true
comments: true
share: true
---
# Your Post Title
Your content here...- Markdown Support: Full markdown syntax with code highlighting
- Table of Contents: Automatic TOC generation
- Reading Time: Calculated automatically
- Social Sharing: Built-in share buttons
- Categories & Tags: Organize and filter content
- SEO Optimization: Automatic meta tags and structured data
Update site information in app/layout.tsx:
export const metadata = {
title: {
default: 'Your Name - Blog Title',
template: '%s | Your Name'
},
description: 'Your blog description',
// ... other metadata
}Customize colors in tailwind.config.js:
theme: {
extend: {
colors: {
primary: {
// Your custom color palette
}
}
}
}- Posts: Add markdown files to
content/posts/ - Images: Place in
public/images/ - Static Pages: Modify files in
app/
The site automatically deploys to GitHub Pages when you push to the main branch:
-
Enable GitHub Pages:
- Go to repository Settings β Pages
- Select "GitHub Actions" as source
-
Push your changes:
git add . git commit -m "Your commit message" git push origin main
-
Access your site: Your site will be available at
https://yourusername.github.io
npm run export
# Upload the 'out' directory to your hosting providerCreate a .env.local file for local development:
NEXT_PUBLIC_SITE_URL=http://localhost:3000Add Google Analytics in app/layout.tsx:
// Add your Google Analytics tracking codeThe contact form is ready for integration with services like:
- Formspree
- Netlify Forms
- EmailJS
- Lighthouse Score: 95+ on all metrics
- Static Generation: Pre-rendered at build time
- Image Optimization: Next.js automatic optimization
- Code Splitting: Automatic bundle optimization
- Font Optimization: Google Fonts with display swap
- Meta Tags: Comprehensive meta tags for all pages
- Open Graph: Social media sharing optimization
- Structured Data: JSON-LD for better search results
- Sitemap: Automatically generated
- RSS Feed: Built-in RSS feed support
Fully responsive with breakpoints:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes
- Test locally:
npm run dev - Commit changes:
git commit -m "Add new feature" - Push to branch:
git push origin feature/new-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter issues:
- Check the Next.js documentation
- Review GitHub Pages documentation
- Open an issue in this repository
- Contact via the contact form
- Next.js - React framework
- Tailwind CSS - Utility-first CSS
- Lucide React - Beautiful icons
- GitHub Pages - Free hosting
- Vercel - Next.js creators