docs: modify README.

This commit is contained in:
KenanZhu committed 2026-10-12 09:27:33 +08:00
1 parent bcf1b87e82
commit 3d7cf17fb1
2 files changed
+11 -14

No files matched your search

+4 -6
View File
@@ -26,7 +26,7 @@ The gallery shows how the email templates render in the preview tool.
| ![Terminal](docs/images/terminal.png) | **Terminal** | Dark background, monospace fonts and green accents |
| ![Terra](docs/images/terra.png) | **Terra** | Earth tones, terracotta buttons and serif fonts |
Screenshots show only the current default build. Use the [local preview](#preview) to view other email types and languages. See the [screenshot guide](docs/images/README.md) when updating screenshots.
Screenshots show only the current default build. Use the [preview](#preview) to view other email types and languages. See the [screenshot guide](docs/images/README.md) when updating screenshots.
## Installation
@@ -53,7 +53,7 @@ go run . build all
cd ..
```
Building usable templates requires resources from the official Gitea repository to ensure consistent source inputs. The command automatically downloads the official files pinned by `gitea.lock.json`. Subsequent builds use the cached resources without downloading them again. For missing files or a damaged cache, see [official snapshot updates](#official-snapshot-updates).
Building usable templates requires resources from the official Gitea repository to ensure consistent source inputs. The command automatically downloads the official files pinned by `gitea.lock.json`. Subsequent builds use the cached resources without downloading them again.
### Install a Theme
@@ -110,7 +110,7 @@ go run . dev
cd ..
```
Open [http://127.0.0.1:3456](http://127.0.0.1:3456). The Go server watches theme files, the shared framework, the lock file and cache, and preview test data. When a file changes, it rebuilds the email templates and refreshes the page through server-sent events (SSE) to provide live reload.
Open [http://127.0.0.1:3456](http://127.0.0.1:3456). The server watches theme files, the shared framework, the lock file and cache, and preview test data. When a file changes, it rebuilds the email templates and refreshes the page through server-sent events (SSE) to provide live reload.
### Controls and Keyboard Shortcuts
@@ -138,7 +138,6 @@ The project is organized around a shared framework, theme styles and build tools
```text
.github/ # Workflows and maintenance scripts
release-notes/ # Release notes for each version
scripts/ # Documentation updates, packaging and Gitea release scripts
workflows/ # Validation and publication
docs/ # Chinese documentation, documentation index and gallery images
@@ -155,7 +154,6 @@ tools/ # Go CLI, build tools and tests
preview/ # Email rendering, locale adaptation and development server
upstream/ # Official snapshot downloads, verification and translation key discovery
gitea.lock.json # Official version tag, commit and file checksums
README.md
```
Official templates provide notification content, conditions, subject lines and links. The shared framework handles email presentation, while themes use metadata and CSS to select layouts and define styles. Theme directories do not contain official email source files or translations.
@@ -196,7 +194,7 @@ Gitea currently includes the following 11 email templates [1](#notes):
## Contributing
Contributions to themes, tools, documentation and translations are welcome. The [contributor guide](CONTRIBUTING.md) covers local environment setup, design guidelines, required checks and the release process.
Contributions to themes, tools, documentation and translations are welcome. See the [contributor guide](CONTRIBUTING.md) for details on contributing.
## License
+7 -8
View File
@@ -7,7 +7,7 @@ Gitea Mail Template 为自托管的 [Gitea](https://about.gitea.com) 提供多
> 最新发布版:[v28.0.0](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/latest)
仓库包含数种主题的 Gitea 邮件模板,适合大多数的部署场景与应用范围。安装前,请根据 Gitea 版本查阅[兼容矩阵](../COMPATIBILITY.md#compatibility-matrix),选择对应的发行包。
仓库包含数种主题的 Gitea 邮件模板,适合大多数的部署场景与应用范围。安装前,请根据 Gitea 版本查阅[兼容性表](./COMPATIBILITY.zh-CN.md#兼容性表),选择对应的发行包。
## 风格画廊
@@ -26,7 +26,7 @@ Gitea Mail Template 为自托管的 [Gitea](https://about.gitea.com) 提供多
| ![Terminal](images/terminal.png) | **Terminal** | 深色背景、等宽字体、绿色强调色 |
| ![Terra](images/terra.png) | **Terra** | 大地色调、陶土色按钮、衬线字体 |
截图仅展示当前默认构建效果,其他邮件类型和语言可通过[本地预览](#预览)查看;更新截图请参阅[截图指南](images/README.md)。
截图仅展示当前默认构建效果,其他邮件类型和语言可通过[预览](#预览)查看;更新截图请参阅[截图指南](images/README.md)。
## 安装
@@ -52,7 +52,8 @@ cd tools
go run . build all
cd ..
```
构建可用模板时需要依赖于 Gitea 官方仓库的资源文件,以确保来源的一致性。因此该命令会自动下载由`gitea.lock.json` 文件锁定的官方文件,后续构建无需再次下载,使用缓存目录资源即可运行。文件缺失或缓存损坏的处理方式见[更新官方快照](#更新官方快照)。
构建可用模板时需要依赖于 Gitea 官方仓库的资源文件,以确保来源的一致性。因此该命令会自动下载由`gitea.lock.json` 文件锁定的官方文件,后续构建无需再次下载,使用缓存目录资源即可运行。
### 安装主题
@@ -74,7 +75,7 @@ systemctl restart gitea
```
> [!TIP]
> 使用源码构建产物时,将复制来源改为 `build/themes/horizon/mail/.`。Docker 和 Windows 部署请使> 用相应的容器或服务管理方式暂停和重启。
> 使用源码构建产物时,将复制来源改为 `build/themes/horizon/mail/.`。Docker 和 Windows 部署请使用相应的容器或服务管理方式暂停和重启。
### 切换主题
@@ -109,7 +110,7 @@ go run . dev
cd ..
```
打开 [http://127.0.0.1:3456](http://127.0.0.1:3456)。Go 服务器监听主题文件、共享框架、锁文件与缓存、预览测试数据的变化。一旦监听到文件更改,服务器会将邮件模板重新构建后通过发送事件(SSE)刷新页面,以实现实时热重载。
打开 [http://127.0.0.1:3456](http://127.0.0.1:3456)。服务器会监听主题文件、共享框架、锁文件与缓存、预览测试数据的变化。一旦监听到文件更改,服务器会将邮件模板重新构建后通过发送事件(SSE)刷新页面,以实现实时热重载。
### 控制和快捷键
@@ -137,7 +138,6 @@ cd ..
```text
.github/ # 工作流及维护脚本
release-notes/ # 各版本的发行说明
scripts/ # 文档更新、打包和 Gitea 发布脚本
workflows/ # 验证和发布
docs/ # 中文文档、文档索引和画廊图片
@@ -154,7 +154,6 @@ tools/ # Go 命令行工具、构建工具和测试
preview/ # 邮件渲染、语言适配和开发服务器
upstream/ # 官方快照下载、校验和翻译键发现
gitea.lock.json # 官方版本标签、提交和文件校验值
README.md
```
官方模板提供通知内容、条件、主题行和链接;共享框架负责邮件呈现,主题通过元数据和 CSS 选择布局、定义样式。主题目录中不保存官方邮件源码或翻译文件。
@@ -195,7 +194,7 @@ preview/rendered/<LOCALE>.js # 各语言的预览数据
## 参与贡献
欢迎改进主题、工具、文档和翻译。[贡献指南](CONTRIBUTING.zh-CN.md)介绍了本地环境准备、设计规范、检查要求和发布流程。
欢迎改进主题、工具、文档和翻译。[贡献指南](CONTRIBUTING.zh-CN.md)介绍了贡献相关的事宜。
## 许可证