Gitea 1.27.2 (2026-08-14, security + bugfix release) contains no mail template changes — verified against the local gitea clone: only modules/templates/util_render.go (avatar-stack UI fix) differs from 1.27.1, templates/mail and services/mailer are untouched. Versioning now uses the annotation scheme: release numbers stay on the project's own scheme and the supported Gitea version is appended in parentheses — v1.0.1(v1.27.2). Synced everywhere: - COMPATIBILITY.md: active row v1.0.1(v1.27.2), latest verified 1.27.2, Versioning section reworded, 1.27.2 history row added - README.md / docs/README.zh-CN.md: badge, release line, latest tested, versioning bullets - AGENTS.md: annotation scheme + current release v1.0.1 (tracks 1.27.2) - gitea-tracker.yml: PR checklist now updates the parenthesized Gitea version instead of bumping the release number; new tags only when template content changes - CONTRIBUTING.md: simplified Translations section The local v1.27.1 tag was removed — it conflicts with the annotation scheme; releases keep v1.0.x tags. Co-Authored-By: Claude <noreply@anthropic.com>
Gitea 邮件模板
为自托管 Gitea 实例精心设计、面向不同受众的邮件模板集合。
110 个模板文件 — 10 种视觉风格,每种 11 种邮件类型
设计理念
大多数自托管 Gitea 实例使用默认的纯文本邮件模板。本项目提供了开箱即用、视觉精美的替代方案——每种方案都针对特定社区或受众设计,您可以选择最适合您用户的风格。
每个模板都是直接替换。所有 Go 模板变量、翻译键和 Gitea 数据上下文完全兼容。无需补丁、无需插件、无需 fork。
风格画廊
图片为 600px 宽截图,来自在线预览。截图方法参见 images/README.md。
安装
选择一种风格,将 mail/ 目录复制到 Gitea 自定义模板路径:
cp -r themes/horizon/mail/* /var/lib/gitea/custom/templates/mail/
systemctl restart gitea
切换风格只需覆盖文件,无需更改配置。
确认生效
管理后台的测试邮件不会使用自定义模板。要验证模板是否生效,请触发一次真实的 邮件通知。最快的方式是密码重置:退出登录,点击登录页的**"忘记密码"**,查看 重置邮件即可——它将使用你的自定义样式渲染。
预览
静态模式:
cd tools && go run . preview all
然后打开 preview/index.html。
开发服务器(实时重载):
cd tools && go run . dev
# → http://localhost:3456
| 功能 | 静态 | Dev |
|---|---|---|
| Go 模板渲染 | ✅ | ✅ |
| 主题/模板切换 | ✅ | ✅ |
| 实时重载 | — | ✅ |
兼容性
- Gitea 1.25+ — v1.25 引入的邮件模板目录结构
- 最新测试: Gitea 1.27.2
- 版本号: 发布版本语义化追踪 Gitea 版本 — Gitea 1.27.2 → 模板发布版 v1.0.1(v1.27.2)(详见 COMPATIBILITY.md)
- 与 Gitea 官方模板 100% 兼容 — 详见 COMPATIBILITY.md
许可证
MIT — 详见 LICENSE。









