A modern personal blog with a ChatBot-style interface built with Next.js 14, featuring dark/light mode, internationalization (Korean/English), and a unique chat bubble post layout.
- Chat-style Interface: Posts are displayed as alternating chat bubbles (user/bot style)
- Internationalization: Full support for Korean and English with
next-intl - Dark/Light Mode: Seamless theme switching with system preference detection
- MDX Support: Rich content with custom components and syntax highlighting
- Resizable Sidebar: Draggable sidebar with persistent width settings
- Advanced Search: Full-text search with highlighting and filters
- Comments: Integrated Giscus comments system
- Responsive Design: Mobile-first approach with Tailwind CSS
- Static Export: Ready for deployment to GitHub Pages or any static hosting
- SEO Optimized: Structured data, meta tags, and sitemap generation
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Content: MDX with
next-mdx-remote - Internationalization:
next-intl - Comments: Giscus
- Icons: Lucide React
- Deployment: GitHub Pages / Vercel
my-blog/
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── [locale]/ # Internationalized routes
│ │ └── globals.css # Global styles
│ ├── components/ # React components
│ │ ├── ChatInterface.tsx
│ │ ├── PostContent.tsx
│ │ ├── Sidebar.tsx
│ │ ├── Giscus.tsx
│ │ └── WelcomeMessage.tsx
│ ├── content/ # MDX blog posts
│ │ ├── en/ # English posts
│ │ └── ko/ # Korean posts
│ ├── lib/ # Utility functions
│ └── messages/ # i18n translations
├── public/ # Static assets
├── .github/workflows/ # GitHub Actions
└── package.json
- Node.js 18.0 or later
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd my-blog- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
-
Create a new MDX file in the appropriate language folder:
- Korean:
src/content/ko/your-post-slug.mdx - English:
src/content/en/your-post-slug.mdx
- Korean:
-
Add frontmatter to your MDX file:
---
title: "Your Post Title"
excerpt: "A brief description of your post"
date: "2024-01-01"
tags: ["nextjs", "react", "blog"]
readingTime: 5
---
# Your First Section (User message)
This will appear as a user message bubble.
# Bot Response
This will appear as a bot response bubble.
# Another User Message
Posts alternate between user and bot style automatically.Posts are automatically split into chat bubbles based on # H1 headings:
- Even indices (0, 2, 4...): User messages (right-aligned, primary color)
- Odd indices (1, 3, 5...): Bot responses (left-aligned, card background)
Modify tailwind.config.js to customize colors and themes:
module.exports = {
theme: {
extend: {
colors: {
primary: {
// Your custom primary colors
}
}
}
}
}Update the Giscus configuration in src/components/Giscus.tsx:
- Replace the placeholder values with your repository information
- Configure category and other settings according to your needs
Additionally, modify some hard-coded information in React Component and ./src/messages to suit your information
The project is configured for automatic deployment to GitHub Pages using GitHub Actions.
- Push to the
mainbranch - GitHub Actions will automatically build and deploy to GitHub Pages
# Build and export static files
npm run build
# The static files will be in the 'out' directory
# Upload to your preferred static hosting serviceSimply connect your GitHub repository to Vercel for automatic deployments.
The blog supports Korean and English:
- URLs:
/ko/post/slugor/en/post/slug - Messages: Stored in
src/messages/[locale].json - Content: Separate MDX files for each language
- Create message files:
src/messages/[locale].json - Add locale to
src/lib/i18n.ts - Update middleware configuration
- Create content folders:
src/content/[locale]/
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 checkingnpm run deploy- Build and export for static hosting
The unique chat interface transforms traditional blog posts into a conversational format, making content more engaging and easier to read.
The sidebar width is:
- Draggable on desktop
- Persistent across sessions
- Collapsible for more reading space
- Responsive on mobile devices
Full-text search includes:
- Content highlighting
- Filter by tags
- Sort by date/title/reading time
- Search result snippets
- Static export support
- Optimized bundle size
- Image optimization
- CSS compression
- Component lazy loading
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
- GitHub: iamb0ttle
- Email: nbhyun0329@gmail.com
- LinkedIn: byeonghyeon-na
Built with ❤️ using Next.js 14, TypeScript and my fantastic ultra-think co-worker Claude Code 😎
