html operation renders HTML templates using template engines. It’s typically used in ensemble flows when an HTTP trigger needs to return server-rendered HTML.
Note: The html operation is for rendering only. HTTP routing, authentication, CORS, and middleware are configured in the trigger: section using type: http.
HTTP Middleware
When using thehtml operation with HTTP triggers, you can add Hono middleware for cross-cutting concerns like logging, compression, and security headers:
- Request/response logging (
logger) - Response compression for faster page loads (
compress) - Security headers (
secure-headers) - Cache validation with ETags (
etag) - Custom authentication and rate limiting
Usage in Ensembles with HTTP Trigger
Configuration
Template Engines
Liquid (Default)
Handlebars
Simple (String Interpolation)
Complete Example
Personalization with Cookies
Use cookies to personalize HTML content based on user preferences or session data:Next Steps
Generate PDFs
Triggers
HTTP trigger for web routing

