Skip to content

everfu/cube-blog

Repository files navigation

Cube Blog

A modern, minimalist personal blog built with Next.js 16 and UnoCSS.

Features

  • ✨ Clean, minimalist design
  • πŸ“ MDX support with syntax highlighting (Shiki)
  • 🎨 Atomic CSS with UnoCSS
  • πŸš€ Next.js 16 App Router
  • πŸ“± Fully responsive
  • πŸ’¬ Real-time online presence (Liveblocks)
  • πŸ–ΌοΈ Photo album with lightbox
  • οΏ½ RSS feed (Atom)
  • πŸ—ΊοΈ Auto-generated sitemap

Tech Stack

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm 9+

Installation

pnpm install

Environment Variables

Copy .env.example to .env.local and configure:

NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=your_liveblocks_public_key

Development

pnpm dev

Open http://localhost:3000 to view the blog.

Build

pnpm build
pnpm start

Project Structure

cube-blog/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/              # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ layout.tsx    # Root layout
β”‚   β”‚   β”œβ”€β”€ page.tsx      # Home page
β”‚   β”‚   β”œβ”€β”€ posts/        # Blog posts
β”‚   β”‚   β”œβ”€β”€ stack/        # Tech stack page
β”‚   β”‚   β”œβ”€β”€ album/        # Photo album
β”‚   β”‚   β”œβ”€β”€ atom.xml/     # RSS feed
β”‚   β”‚   └── sitemap.ts    # Sitemap generator
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ data/             # Static data
β”‚   β”œβ”€β”€ lib/              # Utilities
β”‚   └── types/            # TypeScript types
β”œβ”€β”€ content/
β”‚   └── posts/            # Markdown/MDX posts
β”œβ”€β”€ blog.config.ts        # Site configuration
β”œβ”€β”€ uno.config.ts         # UnoCSS configuration
└── next.config.js        # Next.js configuration

Configuration

Edit blog.config.ts to customize site info:

export const siteConfig = {
  name: "Your Blog Name",
  title: "Your Blog Title",
  description: "Your blog description",
  url: "https://your-domain.com",
  author: {
    name: "Your Name",
    email: "you@example.com",
  },
  // ...
}

Writing Posts

Create a new .mdx file in content/posts/:

---
title: "Your Post Title"
date: "2024-11-30"
excerpt: "A brief description"
tags: ["tag1", "tag2"]
---

Your content here with **MDX** support...

Deployment

Vercel (Recommended)

  1. Push to GitHub
  2. Import on Vercel
  3. Add environment variables
  4. Deploy

Other Platforms

Compatible with Netlify, Cloudflare Pages, AWS Amplify, or self-hosted.

License

MIT

Credit

Thank you design by suss.me.

About

A modern, minimalist personal blog built with Next.js 16 and UnoCSS.

Topics

Resources

License

Stars

Watchers

Forks