Overview
Conductor’s template system enables you to create versioned, reusable HTML/Email/PDF templates that can be updated independently from your application code. Templates are stored in Edgit, cached at the edge, and loaded dynamically at runtime. Perfect for teams that need to:- Update email templates without redeploying code
- A/B test different template versions simultaneously
- Maintain separate template versions across environments
- Share templates across multiple ensembles and members
- Deploy template updates with zero downtime
Quick Example
Why Templates in Conductor?
Instant Updates
Update templates without rebuilding or redeploying your application:Zero-Downtime Deployments
Each template version is cached independently at the edge:A/B Testing
Run multiple template versions simultaneously:Component Independence
Templates evolve separately from application code:Template Types
Email Templates
HTML emails with Handlebars syntax:HTML Page Templates
Full HTML pages with dynamic data:PDF Templates
HTML templates rendered as PDFs:Component Templates
Reusable UI fragments loaded via partials:Template Workflow
1. Create Template
Organize templates by type and purpose:2. Register in Edgit
Register each template as a component:3. Version Templates
Create semantic versions:4. Deploy to KV
Deploy templates to Cloudflare KV for edge access:5. Reference in Ensembles
Use templates in your ensemble definitions:Template Caching
Default Caching
Templates are cached at the edge for 1 hour by default:Custom Cache Configuration
Override cache settings per template:Cache Invalidation
Invalidate template cache after updates:Cache Performance
Without Caching:Template Variables
Variable Syntax
Handlebars variables in templates:Passing Data
Pass variables from ensemble to template:Variable Validation
Document required variables in Edgit metadata:Best Practices
Template Organization
Group by Type and Purpose:Naming Conventions
Use Descriptive, Hyphenated Names:Versioning Strategy
Follow Semantic Versioning:Testing Templates
Test Before Production:Component Reuse
Create Reusable Components:Error Handling
Provide Fallback Values:Troubleshooting
Template Not Found
Problem:Template not found: template://welcome-email@v1.0.0
Solutions:
Variables Not Rendering
Problem: Variables showing as{{variableName}} in output
Solutions:

