HTML Responses
Prism includes a.html() response helper for serving HTML content. Combined with Swift’s multi-line strings and string interpolation, you can generate dynamic HTML pages directly from your route handlers.
Basic HTML Response
Simple HTML Page
Dynamic Content
Swift’s string interpolation makes it natural to inject data:Dynamic HTML
Reusable Layout Functions
Keep your HTML DRY with layout functions:Layout Helper
Rendering Lists
HTML Table from Data