A modern, multilingual blog built with Next.js, featuring a beautiful dark mode, MDX support, and internationalization.
-
π Internationalization (i18n)
- Support for multiple languages (currently English and Portuguese)
- Easy language switching with URL-based routing
- Seamless content translation management
-
π Dark Mode
- Beautiful dark/light theme switching
- System preference detection
- Persistent theme selection
-
π MDX Support
- Write posts in MDX format
- Code syntax highlighting
- Support for React components in markdown
- Automatic slug generation
-
π¨ Modern Design
- Clean and responsive layout
- Tailwind CSS for styling
- Custom components for consistent UI
- Smooth animations and transitions
-
π§ͺ Testing
- Comprehensive test suite with Vitest
- Component testing with React Testing Library
- High test coverage
- Node.js (v18 or higher)
- Yarn package manager
- Clone the repository:
git clone https://github.com/dennercodes/blog.git
cd blog- Install dependencies:
yarn install- Start the development server:
yarn devThe blog will be available at http://localhost:3000.
βββ src/
β βββ app/ # Next.js app router pages
β βββ components/ # React components
β βββ content/
β β βββ blog/ # MDX blog posts by language
β βββ i18n/ # Internationalization setup
β βββ messages/ # Translation messages
β βββ providers/ # React context providers
β βββ utils/ # Utility functions
βββ public/ # Static assets
βββ messages/ # Translation files
βββ tests/ # Test files
- Create a new MDX file in
src/content/blog/[language]/directory - Add frontmatter with required fields:
---
title: Your Post Title
description: A brief description
date: '2024-03-23'
tags: ['tag1', 'tag2']
locale: 'en'
originalTitle: 'Original Title' # For translations
---- Write your content in MDX format
- The post will automatically appear in the blog list
- Create corresponding MDX files in each language directory
- Use the same
originalTitleto link translations - Update translation messages in
messages/[lang].json
yarn dev- Start development serveryarn build- Build for productionyarn start- Start production serveryarn test- Run testsyarn lint- Run ESLintyarn type-check- Run TypeScript type checking
- Next.js - React framework
- TypeScript - Type safety
- Tailwind CSS - Styling
- next-intl - Internationalization
- MDX - Markdown with JSX
- Vitest - Testing framework
- React Testing Library - Component testing
- Radix UI - Accessible components
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Denner Rondinely - GitHub