gophenberg README

The project's README from github.com/gopherium/gophenberg. As one markdown file: README.md.

Gophenberg

codecov Discord

A plugin-first CMS. Go backend exposing a JSON API, React SPA admin built on top of the WPDS and Gutenberg block editor.

Documentation

What works today

Running it locally

Go as pinned in go.mod, Node 26 with pnpm, and Docker for the PostgreSQL service.

cp .env.example .env
make seed

make seed starts PostgreSQL, applies the migrations, and creates a development administrator ([email protected] with the password password1234) alongside demo content. Then run the API and the admin in two terminals:

make dev
pnpm install && pnpm --filter @gophenberg/frontend dev

The API listens on localhost:8081 and the admin on localhost:5174, which proxies /api to the API.

To self-host a real deployment instead, follow the install guide.

Writing a theme

A theme is an Astro project depending on @gophenberg/astro. You write your layouts, the kit supplies the routes and the block rendering. test/theme is a working example, and writing a theme walks it.

Writing a plugin

A plugin is a Go package under plugins/ with a plugin.json, compiled in by make generate. plugins/feed is the reference, and write a plugin walks it.

Translating

The admin speaks whatever language its catalogues carry. Translation happens on POEditor, no Git needed, and a weekly job carries the finished work back in one batch. Translate Gophenberg walks it.

License

Copyright (C) 2026 Manuel 'SirLouen' Camargo

Gophenberg is free and open-source software under the Apache License 2.0. Hand-written source files carry an SPDX-License-Identifier: Apache-2.0 header.

Built frontend artifacts bundle @wordpress/* packages licensed under GPL-2.0-or-later. Those combined bundles are conveyed under the terms of the GPLv3, while all original source files in this repository remain Apache-2.0.

gophenberg (gopherium/gophenberg)

Searching Database…

这是什么?Gophenberg 是一个以插件为核心的 CMS,后端用 Go 编写并提供 JSON API,管理后台是一个基于 Gutenberg 区块编辑器构建的 React 单页应用,公开站点还可以选用 Astro 主题。
它更像 WordPress,还是一个无头内容 API?两者都是:根路径下有一个公开网站,/admin 下是管理界面,另外还有一个独立的只读内容 API(位于 /api/content/v1),所以它既可以自己渲染页面,也可以给外部前端提供数据。
我在本地怎么把它跑起来?运行 'make seed' 启动 PostgreSQL、执行数据库迁移,并创建一个带演示内容的开发管理员账号,然后在两个终端里分别启动 API 和管理后台;API 监听 localhost:8081,管理后台监听 localhost:5174。
在试用之前我需要装好哪些东西?你需要 go.mod 中锁定的 Go 版本、Node 26 和 pnpm,以及用来运行 PostgreSQL 服务的 Docker。
如果我不配置主题会怎么样?主题是可选的:只要没有启用 Astro 主题,或者主题挂掉了,Gophenberg 内置的渲染器就会自动接管,所以没有主题网站也能正常运行。
插件是怎么扩展 Gophenberg 的?插件就是一个放在 plugins/ 目录下的 Go 包,附带一个 plugin.json,通过 'make generate' 编译进主程序;它可以拥有自己的路由、公开路径和数据表结构,参考的 'feed' 插件就是个例子,它把文章以 RSS 形式输出。
主题怎么写?主题是一个依赖 @gophenberg/astro 的 Astro 项目:你自己编写布局,路由和区块渲染由这个包提供,test/theme 就是一个可以参考的完整示例。
管理界面的翻译是怎么做的?翻译工作在 POEditor 上进行,不需要用 Git,每周会有一个定时任务把已完成的翻译一次性批量拉回代码仓库。
管理后台开箱即用能做哪些事?它支持在 Gutenberg 里进行区块写作,带自动保存、修订版本、移入回收站和恢复、可筛选的文章列表、可自定义路由的内容类型、能自动生成多种尺寸图片的媒体库,还有基于会话的登录认证,包括登录限流和用户管理页面。
Creator
gopherium
Size
9.7 MB
Stars
574
Age
3mo
Commits · 90 Days