An awesome blog system based on Next.js.
| Default | Nature |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Rich MDX Support - GFM, KaTeX math, admonitions, emoji shortcodes, Shiki-based syntax highlighting, live code editor with Sandpack
- Modern UI/UX - Dark mode, smooth animations, command menu (βK), responsive design, progress indicators
- Advanced Navigation - Auto-generated TOC with active tracking, previous/next posts, tag filtering, search
- Social & Interactive - Giscus comments, share buttons, GitHub integration
- Bilingual (i18n) - Full English/Chinese support with locale-specific routing
- AI Agent Actions - One-click "Read with Claude" or "Read with ChatGPT" to open articles in AI assistants with context
- llms.txt API - Auto-generated structured feed for LLM consumption at
/llms.txt
- Modern Stack - Next.js App Router + Turbopack, React Compiler, TypeScript strict mode
- Comprehensive Testing - Vitest (unit), Playwright (E2E), Testing Library
- Code Quality - ESLint, Stylelint, Prettier, CI/CD with GitHub Actions
- Performance - Automatic code splitting, image optimization, Rust-based builds
- SEO Ready - Meta tags, sitemap, robots.txt, Open Graph, Twitter Cards
.yaml front matter + .mdx body:
---
layout: post
title: 'Your Post Title'
description: 'Your post description'
author: 'Your Name'
date: 2026-01-01
thumbnail: '/thumbnails/your-thumbnail.jpg'
tags:
- Your Tag 1
- Your Tag 2
- Your Tag 3
---
# Your Post Title
## Introduction
Your content here...
## Math Support
Inline math: $E = mc^2$
Block math:
$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$
## Admonitions
:::note
This is a note admonition.
:::
:::tip
This is a tip admonition.
:::
:::warning
This is a warning admonition.
:::- Node.js 18.17 or later
- pnpm 10 or later
git clone https://github.com/sabertazimi/blog
cd blog
pnpm installpnpm devOpen the source code and start editing!
Your site is now running at http://localhost:3000!
# Build for production
pnpm build
# Start production server
pnpm serveBuild for production:
pnpm buildThe optimized production build will be in the .next folder.
Edit src/lib/site.ts to customize your blog:
export const site = {
author: 'Your Name',
url: 'https://yourblog.com',
// ... more settings
}Configure supported locales in src/i18n/routing.ts:
export const routing = defineRouting({
locales: ['en-US', 'zh-CN'],
defaultLocale: 'en-US',
localePrefix: 'always',
})Add translations in messages/[locale].json:
{
"site": {
"title": "Your Blog Title",
"description": "Your blog description"
},
"common": {
"loading": "Loading...",
"backToTop": "Back to top"
}
}Organize MDX posts by locale in content/[locale]/:
content/
βββ en-US/
β βββ my-first-post.mdx
β βββ ...
βββ zh-CN/
βββ my-first-post.mdx
βββ ...The blog uses Tailwind CSS with custom CSS variables.
Edit src/app/globals.css to customize colors:
:root {
--background: oklch(100% 0 0deg);
--foreground: oklch(14.5% 0 0deg);
--primary: oklch(20.5% 0 0deg);
/* ... more colors */
}
.dark {
--background: oklch(14.5% 0 0deg);
--foreground: oklch(98.5% 0 0deg);
/* ... more colors */
}Nature theme:
pnpm dlx shadcn@latest add https://tweakcn.com/r/themes/nature.jsonClaude theme:
pnpm dlx shadcn@latest add https://tweakcn.com/r/themes/claude.jsonThe project includes multiple component registries in components.json:
- @animate-ui: https://animate-ui.com - Animated UI components
- @magicui: https://magicui.design - Magic UI components
- @shadcn-studio: https://shadcnstudio.com - Shadcn Studio components, blocks, and themes
You can add components from these registries:
pnpm dlx shadcn@latest add @magicui/morphing-text
pnpm dlx shadcn@latest add @animate-ui/gravity-starsCustomize MDX components in src/components/post-content.tsx:
const mdxComponents = {
aside: MDXAdmonition,
img: MDXImage,
pre: MDXCode,
Button,
Editor: MDXEditor,
// Add your custom components here
}.
βββ node_modules/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ [locale]/ # Locale-based routing
β β β βββ about/ # About page
β β β βββ post/[slug]/ # Dynamic post pages
β β β βββ posts/ # All posts page
β β β βββ tag/[tagName]/ # Tag filter pages
β β β βββ layout.tsx # Locale layout
β β β βββ page.tsx # Home page
β β β βββ not-found.tsx # 404 page
β β βββ globals.css # Global styles
β β βββ providers.tsx # Context providers
β β βββ robots.ts # robots.txt generation
β β βββ sitemap.ts # Sitemap generation
β βββ components/ # React components
β β βββ ui/ # Shadcn UI components
β β β βββ button.tsx
β β β βββ card.tsx
β β β βββ dialog.tsx
β β β βββ skeleton.tsx
β β β βββ ...
β β βββ language-switcher.tsx # Language switcher
β β βββ mdx-code.tsx # Code block with Shiki
β β βββ mdx-editor.tsx # Live code editor with Sandpack
β β βββ mdx-image.tsx # Optimized image component
β β βββ post-card.tsx # Post card component
β β βββ post-content.tsx # MDX content renderer
β β βββ ...
β βββ i18n/ # Internationalization
β β βββ routing.ts # i18n routing config
β β βββ request.ts # Request config
β β βββ navigation.ts # Navigation helpers
β β βββ utils.ts # i18n utilities
β βββ layouts/ # Layout components
β β βββ default-layout.tsx
β βββ lib/ # Utility functions
β β βββ get-posts-data.ts # MDX processing
β β βββ utils.ts # Helper functions
β β βββ get-routes.ts # Route generation
β β βββ seo.ts # SEO utilities
β β βββ ...
β βββ types/ # TypeScript type definitions
β β βββ index.d.ts
β β βββ i18n.ts
β βββ proxy.ts # next-intl middleware
βββ content/ # Blog posts (.mdx files)
β βββ en-US/ # English posts
β β βββ post1.mdx
β β βββ ...
β βββ zh-CN/ # Chinese posts
β βββ post1.mdx
β βββ ...
βββ messages/ # i18n translation files
β βββ en-US.json
β βββ zh-CN.json
βββ public/ # Static assets
β βββ fonts/
β βββ images/
β βββ thumbnails/
β βββ ...
βββ e2e/ # Playwright E2E tests
β βββ home.spec.ts
β βββ i18n.spec.ts
β βββ ...
βββ .github/ # GitHub workflows
β βββ workflows/
β βββ ci.yml
β βββ codeql-analysis.yml
βββ .gitignore
βββ .prettierrc.json
βββ components.json # Shadcn UI config
βββ eslint.config.mjs # ESLint Flat Config
βββ next.config.ts # Next.js configuration
βββ package.json
βββ playwright.config.ts # Playwright configuration
βββ postcss.config.mjs # PostCSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vitest.config.mts # Vitest configuration
βββ LICENSE
βββ README.mdsrc/app/[locale]/: Locale-based Next.js App Router pages with i18n supportsrc/components/: Reusable React componentssrc/components/ui/: Shadcn UI base componentssrc/i18n/: Internationalization configuration and utilitiessrc/lib/: Utility functions and data fetching logicsrc/types/: TypeScript type definitionscontent/: Blog posts in MDX format (organized by locale)messages/: i18n translation JSON filespublic/: Static assets (images, fonts, etc.)e2e/: End-to-end tests with Playwright
- Next.js - React framework
- React - UI library
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- Shadcn UI - Component library
- Motion - Animation library
- Lucide React - Icon library
- Simple Icons - Brand icons
- next-mdx-remote - MDX support
- next-intl - Internationalization
- Shiki - Syntax highlighting
- Sandpack - Live code editor
- KaTeX - Math rendering
- remark - Markdown processing
- rehype - HTML processing
- Vitest - Unit testing
- Playwright - E2E testing
- Testing Library - React testing
importandexportstatements cannot be used inside MDX files due tonext-mdx-remotelimitations.- If you need custom components in MDX, add them to
src/components/post-content.tsx. - See explanation for details.





