A modern, Medium-inspired tech blog built with Next.js 14, featuring App Router, MDX content, and a beautiful responsive design.
- Next.js 14 App Router: Latest Next.js features with App Router architecture
- MDX Content: Write blog posts in Markdown with React components
- Dark/Light Theme: Toggle between themes with smooth transitions
- Syntax Highlighting: Beautiful code blocks with copy functionality
- Reading Progress: Visual indicator showing reading progress
- Responsive Design: Mobile-first design that works on all devices
- SEO Optimized: Proper meta tags and structured data for search engines
- Performance: Static generation, image optimization, and fast loading
- Framework: Next.js 14 with App Router
- Styling: Tailwind CSS with custom typography
- Content: MDX with gray-matter for frontmatter
- Theme: next-themes for dark/light mode
- Icons: Lucide React
- Code Highlighting: react-syntax-highlighter
- Typography: Inter font family
- Clone the repository:
git clone <repository-url>
cd my-tech-blog- Install dependencies:
npm install- Start the development server:
npm run dev- Open http://localhost:3000 in your browser.
Create new blog posts by adding .mdx files to the posts/ directory:
---
title: "Your Blog Post Title"
description: "A brief description of your post"
date: "2024-12-15"
author: "Your Name"
image: "https://example.com/image.jpg"
tags: ["tag1", "tag2", "tag3"]
---
Your blog post content goes here. You can use:
- Markdown syntax
- React components
- Code blocks with syntax highlighting
- Images and other media
```javascript
// Code blocks are automatically highlighted
function example() {
return "Hello, World!"
}βββ app/ # Next.js App Router pages
β βββ [slug]/ # Dynamic blog post routes
β βββ layout.tsx # Root layout
β βββ page.tsx # Homepage
β βββ globals.css # Global styles
βββ components/ # React components
β βββ ui/ # UI components
β βββ header.tsx # Site header
β βββ theme-toggle.tsx
β βββ post-card.tsx
β βββ code-block.tsx
β βββ reading-progress.tsx
βββ lib/ # Utility functions
β βββ posts.ts # Post loading utilities
β βββ types.ts # TypeScript types
β βββ utils.ts # Helper functions
βββ posts/ # MDX blog posts
β βββ getting-started-nextjs-14.mdx
β βββ building-scalable-apis.mdx
β βββ ai-web-development.mdx
βββ public/ # Static assets
Edit tailwind.config.ts to customize colors:
theme: {
extend: {
colors: {
'medium-green': '#1a8917', // Customize accent color
},
},
},Modify typography in app/globals.css:
.prose {
font-size: 21px; /* Body text size */
line-height: 1.58; /* Line height */
letter-spacing: -0.003em; /* Letter spacing */
}Adjust layout constraints in components:
.max-w-680 {
max-width: 680px; /* Content width */
}npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run type-check- Run TypeScript type checking
- Push your code to GitHub
- Import your repository on Vercel
- Deploy automatically
The blog works on any platform supporting Next.js:
- Netlify
- Railway
- Docker
- Traditional hosting with Node.js
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
If you have questions or need help, please open an issue in the repository.
Built with β€οΈ using Next.js 14 and modern web technologies.