跳到正文
封面

ReactPress Theme Starter Guide

ReactPress Theme Starter — official headless visitor theme
Next.js 15 · Tailwind 4 · toolkit · mock mode · Vercel

ReactPress Theme Starter

This repository is the official headless visitor theme for ReactPress. It does not store content locally — every page is rendered from the ReactPress REST API (or built-in mock API during development).

Project structure

app/              # App Router pages (home, article, category, search…)
components/       # Layout, article, comment, search UI
lib/reactpress/   # bootstrap, metadata, SEO, providers
lib/mock-api/     # Offline mock data for pnpm dev:mock
theme.json        # Template map + appearance panel schema

Data integration

Server components call fetch*PageProps(themeApi, …) from @fecommunity/reactpress-toolkit/theme/server. Client islands use hooks and providers from @fecommunity/reactpress-toolkit/ui. All API responses follow { "success": true, "data": ... }.

Headless deployment — API and theme on separate hosts
Production: remote API + Vercel theme · Demo: REACTPRESS_MOCK_API=1

Development modes

  • pnpm dev:mock — built-in mock API, no backend required (used by Vercel demo)
  • pnpm dev — connect to local or remote ReactPress API
  • pnpm build:mock — CI / demo production build with mock data

Appearance

Light/dark mode and primary colors are driven by theme.json appearance settings (defaults: rose primary #e11d48, white / dark gray backgrounds) and applied at runtime via CSS variables.

Repository: github.com/fecommunity/reactpress-theme-starter · Docs: reactpress.surge.sh

评论

填写昵称与邮箱即可评论,无需登录。

推荐阅读