- Remove preview/rendered.js from .gitignore so the project works
out-of-the-box after clone (no Go required for static preview).
- Hide loading spinner when rendered.js is not found; previously
the spinner stayed visible forever because render() returned
early when 'rendered' was null.
- Regenerate rendered.js with all current template fixes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- transform(): only Raw mode does HTML escaping. Modern, Gmail, Outlook
all show the same rendered HTML — in dev mode Juice handles CSS
inlining server-side; in static mode the notice bar warns.
- static-notice: change display from '' to 'block' to properly
override CSS rule #static-notice{display:none}. The empty string
did not override the stylesheet rule in static file:// mode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add static-notice banner: 'Gmail/Outlook simulation is approximate.
Use dev mode for accurate rendering.' Hidden in dev mode via
WebSocket try/catch, auto-shown in file:// mode on WS failure.
- Simplify transform(): Gmail/Outlook modes now return same HTML as
Modern — the dev server with Juice provides actual client sim.
- Add markSafeHTML(): converts RenderedNote/Body/RenderedContent
from plain string to template.HTML so markdown-rendered HTML
content is not escaped by Go's html/template engine.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 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>