Commit Graph
21 Commits
Author SHA1 Message Date
KenanZhu 23f0456622 chore: streamline compatibility tracking and documentation
Release / Validate Templates (push) Canceled after 0s
Release / Package & Release (push) Canceled after 0s
2026-10-09 11:43:02 +08:00
KenanZhu 92d2ba9889 fix: support Gitea 28.0.0 mail templates
Release / Validate Templates (push) Canceled after 0s
Release / Package & Release (push) Canceled after 0s
2026-10-02 19:44:20 +08:00
KenanZhu ffb674669b chore: prepare v1.27.3 release and guard template publishing
Release / Validate Templates (push) Canceled after 0s
Release / Package & Release (push) Canceled after 0s
2026-09-23 14:15:47 +08:00
KenanZhu 4ff008e564 docs: clarify Gitea 1.27.3 fix is on main, not yet released 2026-09-23 14:02:59 +08:00
KenanZhu dfb5024dfb fix: verify Gitea 1.27.3 and repair push mail templates 2026-09-23 13:51:22 +08:00
KenanZhuandClaude a4ba20418c docs: track Gitea 1.27.2 — verified compatible (annotation versioning)
Release / Validate Templates (push) Canceled after 0s
Release / Package & Release (push) Canceled after 0s
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>
2026-08-24 12:01:46 +08:00
KenanZhuandClaude 3f6a2851c7 docs: keep only bilingual (English + Simplified Chinese) README and CONTRIBUTING
Remove ja/ko/ru/zh-TW translations of README.md and CONTRIBUTING.md.
The tracker workflow now only syncs docs/README.zh-CN.md; language links
in README.md, CONTRIBUTING.md, and the AGENTS.md layout are updated to
the two maintained languages.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-24 11:46:50 +08:00
KenanZhuandClaude e06e215d2a docs: adopt semantic versioning — release 1.27.1 tracks Gitea 1.27.1
Templates were re-checked against the local gitea clone (v1.27.1 tag): all
46 translation keys exist in locale_en-US, all data paths match the official
templates, and all 110 templates render via `go run . preview all` — no
template changes required.

From now on release versions mirror the Gitea version they support:
- COMPATIBILITY.md: quick reference now leads with release 1.27.1
  (max tested Gitea 1.27.1, active), v1.0.x marked superseded; new
  Versioning section documents the scheme
- README: release version in header + versioning bullet
- Tracker workflow PR body: added semantic-versioning release checklist
  (bump Template Release column, tag vX.Y.Z)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-24 11:46:04 +08:00
KenanZhuandClaude f33cad7a7e fix: update push commit data paths for Gitea 1.27.1 compatibility
Gitea 1.27.1 fixed the mail template for push events (#38467) —
commit data must now be accessed via .UserCommit.GitCommit instead
of directly on the commit object.

Changed across all 10 themes:
- {{.ID}}               → {{.UserCommit.GitCommit.ID}}
- {{.ID.String}}        → {{.UserCommit.GitCommit.ID.String}}
- {{.MessageTitle}}     → {{.UserCommit.GitCommit.MessageTitle}}

Verification:
- 3 mail-related files changed in Gitea v1.27.0→v1.27.1
- All 110 templates (10 themes × 11 types) render successfully
- No breaking changes — data structure unchanged, only access path

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-02 11:18:22 +08:00
KenanZhu 070858d473 docs: track Gitea 1.27.1 — pending verification 2026-08-01 10:01:28 +00:00
KenanZhuandClaude 0fd9afa671 docs: verify Gitea 1.27.0 compatibility — no mail template changes
Verification results:
- 0 files changed in templates/mail/ or services/mailer/ between v1.26.0 and v1.27.0
- All 110 templates (10 themes × 11 types) render successfully
- No new mail template types, no removed types
- No changes to template functions or data contexts
- No breaking changes for mail templates

Marking v1.0.1 as compatible with Gitea 1.27.0.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-14 11:54:38 +08:00
KenanZhu 349ce602f3 docs: track Gitea 1.27.0 — pending verification 2026-07-14 03:43:30 +00:00
KenanZhuandClaude 5648f73d45 refactor(ci): use marker comments instead of regex for tracker workflow
Add TRACKER: HTML comment markers to COMPATIBILITY.md, README.md, and
all 5 translation READMEs. Rewrite gitea-tracker.yml to use grep -n
for precise line-based insertion and sed line-address editing.

Markers introduced:
- TRACKER:QUICK-REF-MAX  — Quick Reference max tested version
- TRACKER:VERSION-INSERT — Version History row insertion point
- TRACKER:LATEST-VERIFIED — latest verified note version
- TRACKER:BADGE — shields.io badge version
- TRACKER:LATEST-TESTED — latest tested version in READMEs

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-23 10:34:43 +08:00
KenanZhuandClaude 2f27d54251 docs: add Gitea version compatibility matrix and badge
- Create COMPATIBILITY.md with version matrix, Gitea release tracking,
  template variable reference, and compatibility verification process
- Add Gitea 1.25+ | 1.26.4 tested badge to README
- Update all 6 READMEs (EN + 5 translations) with latest tested version
  and link to COMPATIBILITY.md
- Include COMPATIBILITY.md in release artifacts

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-23 10:19:34 +08:00
KenanZhuandClaude 0ad7db124a refactor(preview): remove juice/Node.js, simplify to pure Go dev server with SSE
- Delete tools/server/ (Node.js, juice, inliner.mjs, server.mjs, node_modules)
- Create tools/preview/server.go — pure Go dev server with SSE + file polling
- Rewrite tools/cli/dev.go — start Go server in-process, no Node.js required
- Simplify preview/index.html — View dropdown (Modern/Source), remove Client
  Simulation panel, remove Gmail/Outlook logic, WebSocket → SSE
- Update all 14 documentation files (README, CONTRIBUTING, AGENTS + translations)
  to reflect pure Go dev server and simplified preview

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-23 09:48:04 +08:00
KenanZhu 48541a5aeb docs: update testing guidance, version requirement, and button color fix across all languages 2026-06-12 15:04:14 +08:00
KenanZhu d8a714b2b5 feat(preview): cross-browser scrollbar, keyboard nav, dev-mode client simulation, docs overhaul
preview/index.html:
- Fix scrollbar CSS: scoped webkit pseudo-elements + standards-track fallback, removed deprecated overflow:overlay
- Keyboard navigation: arrows cycle focus between Theme/Template/Client selects, up/down select within focused dropdown, d/m toggle viewport
- Dev/static mode detection: delayed static warning only when WebSocket absent, WebSocket errors only on disconnect (not on initial fail)
- iframe sandbox: removed static sandbox attr, applied dynamically only in dev mode (file: protocol rejects sandboxed srcdoc)
- Loading fix: removed double-toggle between init and render(); added 5s safety timeout
- Transform clean: returns HTML as-is; CSS stripping moved to server-side
- Dev disclaimer: blue info banner shown on WebSocket connect

tools/server/inliner.mjs:
- Added stripGmail() / stripOutlook() — server-side CSS property stripping for email client simulation

tools/server/server.mjs:
- Fixed WebSocket upgrade: use app.listen() instead of createServer(app).listen()
- Juice post-processing now generates three rendered.js variants (modern/gmail/outlook)
- Initial startup runs juice-only pass (avoids duplicate Go compilation)

docs/ (all 6 languages — en, zh-CN, zh-TW, ja, ko, ru):
- Image size limits: max 50KiB, recommended 10-20KiB
- Dev disclaimer: simulation cannot 100% reproduce every client
- Changed 'accurate' to 'relatively accurate' across all static-mode warnings
- Converted all plain blockquotes to GitHub admonitions ([!WARNING] / [!NOTE])
2026-06-04 16:01:42 +08:00
KenanZhuandClaude Opus 4.8 7724b4806c docs: update all docs with dev server, live reload, Juice inlining
- README.md: restructure Preview section into Static + Dev modes
  with feature comparison table; mention juice inlining and live reload
- CONTRIBUTING.md: update Development Setup with Go/Node.js
  requirements, static vs dev preview workflows, Juice reference
- AGENTS.md: add dev command to subcommand list, document
  tools/server/ directory, update Build Tool section
- docs/CONTRIBUTING.*.md (5 languages): add dev server section,
  Node.js requirement, live reload description
- docs/README.*.md (5 languages): add dev mode to Preview section
- docs/images/README.md: update capture instructions for dev server

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:58:15 +08:00
KenanZhuandClaude Opus 4.8 0bf982ffb9 refactor(tools): modularize CLI with urfave/cli/v2, externalise template metadata
- Split monolithic build-preview.go into modular packages:
  tools.go (entry), cli/ (list/create/delete/preview commands),
  config/ (JSON loading), preview/ (rendering engine, funcs, locale)
- Extract all template metadata into data/templates_config.json
  as single source of truth — no hardcoded template data in Go
- Replace hand-rolled CLI parsing with github.com/urfave/cli/v2
- Add sensible defaults for --folder (../themes) and --config
  (./data/templates_config.json) — most commands now run bare
- Add type-coercing gt/lt/ge/le template funcs for JSON float64
- Fix AppUrl to gitea.com matching official template convention
- rendered.js now exports __REGISTRY__ and __PARAMS__ alongside
  __RENDERED__ — preview/index.html reads all from single source
- Cross-validate all 11 template data contexts against official
  Gitea source (services/mailer/*.go + templates/mail/*.tmpl)
- Update all docs (README, AGENTS, CONTRIBUTING, 5 languages)
  to reflect new CLI workflow with create scaffolding command

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 12:26:44 +08:00
KenanZhuandClaude Opus 4.8 493def1ab8 chore(docs): update directory tree to reflect 10 visual styles
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 18:34:12 +08:00
KenanZhuandClaude Opus 4.8 a2742887e8 chore(init): scaffold Gitea mail templates — 110 templates, 10 visual styles, drop-in deployment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 18:10:22 +08:00