Skip to content

MSOCEO/h1

h1 (寒影)

h1 logo

npm version MIT License Build Status GitHub stars

暗黑美学 · 静态博客框架
A blazing-fast static blog framework powered by Next.js 16


✨ Features

🚀 Blazing Fast Next.js 16 SSG, incremental builds, deploy in seconds
🎨 Theme System 3 built-in themes, CSS variable-driven, one-click switch
🔌 Plugin Architecture Sandboxed isolation, hook mechanism, extensible ecosystem
🌍 14 Languages Auto-detection, seamless switching
✍️ Visual Editor Tiptap rich text + Markdown dual mode
📊 Data Analytics Visit analytics, draft management, all-in-one dashboard

🚀 Quick Start

npx create-h1-app my-blog
cd my-blog
npm install
npm run dev

Open http://localhost:3000 to see your blog.

📚 Documentation

Visit the full documentation at /docs after running the dev server, or check out the source in src/app/docs/.

📁 Project Structure

my-blog/
├── content/posts/     # Blog posts (Markdown)
├── src/
│   ├── app/          # Next.js app router
│   ├── components/   # React components
│   ├── lib/          # Utilities
│   └── i18n/        # Translations (14 langs)
├── plugins/          # Plugin system
└── public/           # Static assets

✍️ Writing Posts

Create a .md file in content/posts/:

---
title: My First Post
date: 2025-01-01
tags: [h1, blog]
excerpt: This is my first post.
---

# Hello h1

This is my first post on h1!

🎨 Themes

h1 ships with 3 built-in themes:

  • Cyberpunk — Neon cyan palette, dark aesthetic
  • Minimal — Monochrome, clean and simple
  • Ocean — Deep blue gradient

Switch themes from the bottom-right corner (theme switcher).

🔌 Plugins

Create a .js file in plugins/:

module.exports = function (h1) {
  h1.on('postTitleRender', (title) => {
    return '✨ ' + title;
  });
};

Plugins run in isolated vm2 sandboxes for security.

🌍 Internationalization

h1 supports 14 languages out of the box:

简体中文 · 繁體中文(台灣) · 繁體中文(香港) · English · 日本語 · 한국어 · Français · Deutsch · Español · Русский · Português · العربية · हिन्दी · Italiano

All UI text uses the t() translation function. Add new languages in src/i18n/translations/.

📦 Deployment

Vercel (Recommended)

  1. Push to GitHub
  2. Import repo in Vercel
  3. Auto-detected as Next.js → Deploy

Netlify

  • Build command: npm run build
  • Publish directory: out

Self-hosted

npm run build
npm run start

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md first.

git clone https://github.com/MSOCEO/h1.git
cd h1
npm install
npm run dev

📄 License

MIT License © 2025 h1 (寒影)

⭐ Showcase

Using h1? Open a PR to add your site here!


Built with ❤️ by MSOCEO

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors