使用 Next.js 15 App Router,搭配 TypeScript 与 BlogNow SDK 提供类型支持
blognow-nextjs-starter — Next.js 博客模板
作者 synkc0
基于 Next.js 15 App Router、TypeScript 与 Tailwind CSS 的博客起始模板,通过 BlogNow.Tech 管理内容,提供博客列表、文章详情、搜索、分页、暗色模式与 SEO 配置。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
通过 BlogNow.Tech 管理博客内容,支持标签、分类、图片上传与定时发布
博客列表页采用服务端分页,文章详情页使用 SSG 并设置 ISR 每 5 分钟重新验证
内置客户端实时搜索,可对当前已加载文章的标题和摘要进行过滤
包含动态 sitemap、robots.txt、Open Graph 与 Twitter Cards 等 SEO 配置
提供手动暗色模式切换,主题偏好保存在 localStorage 中
模板详细介绍
这是一个以 BlogNow.Tech 为内容源的 Next.js 博客起始模板。README 说明其使用 Next.js 15 App Router、TypeScript 和 Tailwind CSS v4 构建,博客内容通过 BlogNow 仪表盘创建和管理,模板本身不包含内容编辑后台。
模板包含首页、博客列表页 /blog 和文章详情页 /blog/[slug]。列表页采用服务端分页,配合 Zustand 做页面缓存与客户端搜索过滤;文章页使用 SSG 预渲染,并设置 ISR 每 5 分钟重新验证。项目还提供动态 sitemap、robots.txt、Open Graph 与 Twitter Cards 元数据、暗色模式切换以及社交分享按钮。
使用前需要从 BlogNow 仪表盘获取 API Key,并在环境变量中配置 NEXT_PUBLIC_BLOGNOW_API_KEY,可选配置 NEXT_PUBLIC_BLOGNOW_BASE_URL。README 未提供除 BlogNow 之外的内容源支持说明,也未说明模板是否包含评论、用户认证或分析功能。
适合你的项目吗?
适用场景
- 希望快速搭建一个由 BlogNow.Tech 提供内容源的博客站点
- 需要博客列表分页、文章详情静态生成与基础 SEO 元数据的项目
- 想要在 Next.js 15 App Router 项目中参考 Zustand 页面缓存与客户端搜索的实现方式
- 需要暗色模式切换和社交分享按钮的博客前端模板
适合人群
- 使用 BlogNow.Tech 作为博客内容管理后台的开发者
- 熟悉 Next.js App Router、TypeScript 与 Tailwind CSS 的前端开发者
- 需要博客起始模板并计划自行修改组件与样式的项目
- 希望通过 Vercel 一键部署博客前端的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
先在 BlogNow.Tech 注册或登录账号,在仪表盘获取 API Key
- 2
本地开发需克隆仓库并执行 npm install,然后创建 .env.local 并设置 NEXT_PUBLIC_BLOGNOW_API_KEY,可选设置 NEXT_PUBLIC_BLOGNOW_BASE_URL
- 3
执行 npm run dev 启动开发服务器,默认访问 http://localhost:3000
- 4
可通过 Vercel 部署按钮克隆仓库,并在部署时填入 NEXT_PUBLIC_BLOGNOW_API_KEY
- 5
博客图片使用 cdn.blognow.tech 远程域名,已在 next.config.ts 的 images.remotePatterns 中配置
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 使用前必须先在 BlogNow.Tech 注册或登录账号,并从仪表盘获取 API Key。
- 部署到 Vercel 时必须填写 NEXT_PUBLIC_BLOGNOW_API_KEY 环境变量,否则无法获取博客内容。
- 本地开发需在 .env.local 中配置 NEXT_PUBLIC_BLOGNOW_API_KEY,缺少该密钥模板无法运行。
- 博客内容必须通过 BlogNow.Tech 仪表盘创建和管理,模板本身不提供内容编辑后台。
- NEXT_PUBLIC_BLOGNOW_API_KEY 为必填项,是使用该模板的硬性前提。
- 博客图片依赖 cdn.blognow.tech 远程域名,已在 next.config.ts 中配置该外部图片源。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
### 1. Get Your BlogNow API Key
README 原文
2. Enter your `NEXT_PUBLIC_BLOGNOW_API_KEY`
README 原文
NEXT_PUBLIC_BLOGNOW_API_KEY=your_api_key_here
README 原文
Blog content is managed through [BlogNow.Tech](https://blognow.tech). Use their dashboard to:
README 原文
| `NEXT_PUBLIC_BLOGNOW_API_KEY` | Your BlogNow API key | Yes |
README 原文
https://github.com/synkc0/blognow-nextjs-starter/blob/main/LICENSEhttps://github.com/synkc0/blognow-nextjs-starter/blob/main/README.mdhostname: "cdn.blognow.tech",
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-14。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Next.js · React
- 网站类型
- 博客 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2025-12-08
- 截图检查日期
- 2026-10-14
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: codex-user-requested-batch-review-20261015 · 2026-10-15
查看当时使用的来源资料
SHA-256: c3c1ee19595cc074f14d910c0f0fca73a7844f3d4002d6405e442a94aaf3c9c9
2026-10-14T14:40:30.222Z
来源文件 / 仓库# Next.js BlogNow Starter Kit
[](https://vercel.com/new/clone?repository-url=https://github.com/synkc0/nextjs-blog-now-starter-kit&env=NEXT_PUBLIC_BLOGNOW_API_KEY&envDescription=Get%20your%20BlogNow%20API%20key%20from%20https://blognow.tech/dashboard&project-name=my-blognow-blog&repository-name=my-blognow-blog)
View Demo - https://blognow-nextjs-starter.vercel.app/blog
A modern, SEO-optimized blog starter template powered by [BlogNow.Tech](https://blognow.tech) and built with Next.js 15, TypeScript, and Tailwind CSS.
## ✨ Features
- 🚀 **Next.js 15 App Router** - Built with the latest Next.js features
- 📝 **BlogNow Integration** - Seamless blog content management
- 🎨 **Tailwind CSS v4** - Modern, responsive design with custom dark mode
- 🔍 **SEO Optimized** - Complete metadata, Open Graph, Twitter Cards, sitemap & robots.txt
- ⚡ **Hybrid Rendering** - SSG for blog posts, server-side pagination for listing
- 🔎 **Real-time Search** - Client-side search with instant filtering
- 📄 **Server-Side Pagination** - On-demand data fetching with URL-based navigation
- 🎯 **Type-Safe** - Full TypeScript support with BlogNow SDK
- 📱 **Responsive Design** - Mobile-first approach with optimized images
- 🌓 **Dark Mode Toggle** - Manual theme switching with localStorage persistence
- 💾 **Smart State Management** - Zustand with intelligent page caching
- 📊 **Optimized Performance** - Page-level caching to minimize API calls
- 🎨 **Rich Typography** - Enhanced blog content styling with proper spacing
## 🚀 Quick Start
### 1. Get Your BlogNow API Key
1. Visit [BlogNow.Tech](https://blognow.tech)
2. Sign up or log in to your account
3. Navigate to your [Dashboard](https://blognow.tech/dashboard)
4. Copy your API key
### 2. Deploy to Vercel
Click the deploy button above and follow the prompts:
1. Connect your GitHub account
2. Enter your `NEXT_PUBLIC_BLOGNOW_API_KEY`
3. Deploy!
### 3. Local Development
Clone the repository and install dependencies:
```bash
git clone https://github.com/synkc0/nextjs-blog-now-starter-kit.git
cd nextjs-blog-now-starter-kit
npm install
```
Create a `.env.local` file in the root directory:
```bash
NEXT_PUBLIC_BLOGNOW_API_KEY=your_api_key_here
NEXT_PUBLIC_BLOGNOW_BASE_URL=https://api.blognow.tech
```
Run the development server:
```bash
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) to see your blog.
## 📁 Project Structure
```
├── src/
│ ├── app/
│ │ ├── blog/
│ │ │ ├── [slug]/
│ │ │ │ └── page.tsx # Individual blog post (SSG)
│ │ │ └── page.tsx # Blog listing (Server-side pagination)
│ │ ├── layout.tsx # Root layout with header
│ │ ├── page.tsx # Home page
│ │ ├── sitemap.ts # Dynamic sitemap generation
│ │ └── robots.ts # SEO robots configuration
│ ├── components/
│ │ ├── BlogCard.tsx # Blog post preview card
│ │ ├── BlogList.tsx # Client-side paginated list
│ │ ├── BlogListWithPagination.tsx # Server-side paginated list
│ │ ├── Header.tsx # Navigation header
│ │ ├── Pagination.tsx # Client-side pagination UI
│ │ ├── SearchBar.tsx # Real-time search input
│ │ ├── ServerPagination.tsx # Server-side pagination UI
│ │ ├── ShareButton.tsx # Social sharing functionality
│ │ └── ThemeToggle.tsx # Dark mode toggle button
│ ├── lib/
│ │ ├── blognow.ts # BlogNow singleton client
│ │ └── cache.ts # SSG cache with async generator
│ └── store/
│ └── blogStore.ts # Zustand store with page caching
├── .env.example
├── .env.local
└── next.config.ts
```
## 🎨 Customization
### Styling
This template uses Tailwind CSS. Customize colors, fonts, and styles in:
- `tailwind.config.ts` - Tailwind configuration
- `src/app/globals.css` - Global styles
- Component files - Individual component styles
### Content
Blog content is managed through [BlogNow.Tech](https://blognow.tech). Use their dashboard to:
- Create and edit blog posts
- Manage tags and categories
- Upload images
- Schedule posts
### Components
Modify or extend components in `src/components/`:
- **BlogCard** - Blog post preview cards with images and metadata
- **BlogList** - Client-side paginated grid (used on homepage)
- **BlogListWithPagination** - Server-side paginated list (used on /blog)
- **SearchBar** - Real-time search with instant filtering
- **ServerPagination** - URL-based pagination controls
- **ThemeToggle** - Dark/light mode switcher
- **Header** - Navigation bar with theme toggle
- **ShareButton** - Social sharing (Twitter, Facebook, LinkedIn)
## 🔧 Configuration
### Environment Variables
| Variable | Description | Required |
| ------------------------------ | -------------------- | -------------------------------------- |
| `NEXT_PUBLIC_BLOGNOW_API_KEY` | Your BlogNow API key | Yes |
| `NEXT_PUBLIC_BLOGNOW_BASE_URL` | BlogNow API base URL | No (default: https://api.blognow.tech) |
### Next.js Configuration
The template includes optimized Next.js configuration for BlogNow images in `next.config.ts`:
```typescript
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cdn.blognow.tech",
pathname: "/**",
},
],
}
```
### Rendering Strategy
The template uses a hybrid rendering approach:
**Blog Listing Page (`/blog`)**
- Server-side pagination with on-demand data fetching
- Zustand store with intelligent page caching
- URL-based navigation (`/blog?page=2`)
- Real-time client-side search filtering
- ISR revalidation every 5 minutes
**Blog Post Pages (`/blog/[slug]`)**
- Static Site Generation (SSG) for optimal performance
- Pre-rendered at build time using cached data
- ISR revalidation every 5 minutes
Adjust revalidation timing in page files:
```typescript
export const revalidate = 300; // seconds
```
### State Management
Zustand store (`src/store/blogStore.ts`) features:
- **Page Caching**: Visited pages are cached to prevent refetching
- **Search Filtering**: Client-side search across current page posts
- **Server Pagination**: Fetches data on-demand per page
- **Loading States**: Built-in loading and error handling
## 🏗️ Architecture Highlights
### Pagination Strategy
- **/blog page**: Server-side pagination with Zustand state management
- **Homepage**: Client-side pagination with all posts loaded
- **Caching**: Pages are cached in Zustand Map to avoid duplicate API calls
- **URL State**: Page number persists in URL query parameters
### Search Implementation
- **Real-time filtering**: Instant search results as you type
- **Scope**: Searches title and excerpt of currently loaded posts
- **UI State**: Hides pagination when search is active
- **Result count**: Displays number of matching posts
### Dark Mode
- **Toggle**: Manual theme switcher in header
- **Persistence**: Theme saved to localStorage
- **Implementation**: Custom Tailwind variant `@variant dark (&:is(.dark *))`
- **Scope**: Applied across all components
## 📚 Learn More
- [BlogNow Documentation](https://blognow.tech/docs)
- [BlogNow SDK](https://www.npmjs.com/package/@blognow/sdk)
- [Next.js Documentation](https://nextjs.org/docs)
- [Tailwind CSS v4](https://tailwindcss.com/docs)
- [Zustand Documentation](https://zustand.docs.pmnd.rs)
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## 📄 License
MIT License - feel free to use this template for your projects!
## 🙏 Acknowledgments
- Built with [Next.js](https://nextjs.org)
- Powered by [BlogNow.Tech](https://blognow.tech)
- Styled with [Tailwind CSS](https://tailwindcss.com)
- Icons by [Lucide](https://lucide.dev)
---
**Need Help?** Check out the [BlogNow Documentation](https://blognow.tech/docs) or join our community!
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

ai-website-cloner-template
Clone any website with one command using AI coding agents
Next.js · 启动器

Next.js SaaS Starter
Next.js SaaS Starter 是 Next.js 官方维护的 SaaS 起点模板,定位介于学习资源和可直接部署的脚手架之间。
Next.js · SaaS

Next.js Commerce
Next.js Commerce 是 Vercel 团队维护的电商启动模板,基于 Next.js App Router 构建,采用服务端渲染、React Server Components、Server Actions …
Next.js · 电商

Next-js-Boilerplate
Next-js-Boilerplate 是一个面向 Next.js 16、Tailwind CSS 4 和 TypeScript 的启动器,核心定位是开发者体验优先。
Next.js · 启动器

tailwind-nextjs-starter-blog
tailwind-nextjs-starter-blog 是一个面向个人技术博客的 Next.js 与 Tailwind CSS 启动模板,其 v2 版本基于 App Router 与 React Server Comp…
Next.js · 博客

next-forge
Production-grade Turborepo template for Next.js apps.
Next.js · 启动器
