An open API service indexing awesome lists of open source software.

https://github.com/loke-dev/nextjs-mdx-blog-template

nextjs-mdx-blog-template.vercel.app
https://github.com/loke-dev/nextjs-mdx-blog-template

Last synced: about 1 year ago
JSON representation

nextjs-mdx-blog-template.vercel.app

Awesome Lists containing this project

README

          

# Next.js MDX Blog Template

A modern, minimalist blog template built with Next.js, MDX, and Tailwind CSS. Perfect for developers who want to share their thoughts and showcase their work.

Image

## โœจ Features

- ๐Ÿš€ **Next.js 15** with App Router
- โšก **React 19** with Server Components
- ๐ŸŽจ **Tailwind CSS 4** for styling
- ๐Ÿงฉ **shadcn/ui components** via Radix UI
- ๐ŸŒ™ **Dark/Light mode** with next-themes
- ๐Ÿ“ **MDX support** for blog posts
- ๐Ÿ” **SEO optimized** with metadata
- ๐Ÿ“Š **Typed** with TypeScript
- ๐Ÿงน **Linting** with ESLint
- ๐Ÿ’… **Code formatting** with Prettier
- ๐Ÿฆฎ **Accessibility** focused design
- ๐ŸŽ๏ธ **Performance optimized**
- ๐Ÿ“ฑ **Responsive** on all devices
- ๐Ÿƒ๐Ÿปโ€โ™‚๏ธโ€โžก๏ธ **Animations** with Motion
- ๐ŸŽž๏ธ **View Transitions API** support
- ๐Ÿ”’ **Code quality** with Husky & lint-staged

## ๐Ÿงฐ Tech Stack

- [Next.js 15](https://nextjs.org/)
- [React 19](https://react.dev/)
- [TypeScript](https://www.typescriptlang.org/)
- [Tailwind CSS 4](https://tailwindcss.com/)
- [Radix UI](https://radix-ui.com/)
- [Lucide Icons](https://lucide.dev/)
- [MDX](https://mdxjs.com/) for blog posts
- [Shiki](https://shiki.style/) for code highlighting
- [Geist Font](https://vercel.com/font) for typography

## ๐Ÿ“‹ Prerequisites

- [Node.js](https://nodejs.org/en/) (v20 or higher)
- [pnpm](https://pnpm.io/) (v8 or higher)

## ๐Ÿš€ Getting Started

### Installation

1. Clone this repository

```bash
git clone https://github.com/loke-dev/nextjs-mdx-blog-template my-website
cd my-website
```

2. Install dependencies

```bash
pnpm install
```

3. Start the development server

```bash
pnpm dev
```

4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## ๐Ÿ“ Project Structure

```
/
โ”œโ”€โ”€ public/ # Static assets
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ app/ # App router pages
โ”‚ โ”œโ”€โ”€ components/ # React components
โ”‚ โ”‚ โ”œโ”€โ”€ mdx/ # MDX-specific components
โ”‚ โ”‚ โ””โ”€โ”€ ui/ # UI components (shadcn)
โ”‚ โ”œโ”€โ”€ lib/ # Utility functions
โ”‚ โ”œโ”€โ”€ posts/ # MDX blog posts
โ”‚ โ”œโ”€โ”€ styles/ # Global styles
โ”‚ โ””โ”€โ”€ types/ # TypeScript types
โ”œโ”€โ”€ .eslintrc.js # ESLint configuration
โ”œโ”€โ”€ .prettierrc # Prettier configuration
โ”œโ”€โ”€ next.config.ts # Next.js configuration
โ”œโ”€โ”€ tailwind.config.ts # Tailwind CSS configuration
โ””โ”€โ”€ tsconfig.json # TypeScript configuration
```

## ๐Ÿ“ Usage

### Creating Blog Posts

Add new MDX files to the `src/posts` directory:

```mdx
---
title: My New Post
date: 2024-03-25
description: A description of my new post
---

# My New Post

This is the content of my post written in MDX.
```

### Customization

- Update site metadata in `src/app/layout.tsx`
- Modify the theme in `src/styles/globals.css`
- Add or modify components in `src/components`
- Update pages in `src/app` directory

## ๐Ÿ› ๏ธ Development

```bash
# Run development server
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Run linting
pnpm lint

# Format code
pnpm format
```

## ๐Ÿšข Deployment

This template is optimized for deployment on Vercel, but can be deployed on any platform that supports Next.js.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/loke-dev/nextjs-mdx-blog-template)

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

## ๐Ÿ™ Acknowledgements

- [Next.js](https://nextjs.org/) team for the incredible framework
- [Vercel](https://vercel.com/) for hosting and deployment
- [shadcn/ui](https://ui.shadcn.com/) for the beautiful components
- [Tailwind CSS](https://tailwindcss.com/) for the utility-first CSS framework