Skip to content
  • templates
  • cli
  • sdk

Publish several emails from one template project

Register more than one email in a template project. Each is its own template and publication, sharing the project's components, theme, and history.

Keep your password reset, receipt, and welcome emails in one template project. They share components, a theme, and Git history, but each publishes as its own template.

samva templates add emails/reset.tsx
git add emails && git commit -m "Add reset" && git push origin main
samva templates publish --all

What you need to do. samva templates publish now takes an entry path or --all. The old --template-id and --entry flags are gone. If one email fails, the others still publish and the command exits 1 with the full result, so rerunning is safe.

Moved a file with git mv? Run samva templates move <old-path> <new-path> to keep its id and history. In the SDK, register a new email with templates.addEntry.