Build a templates route for server-side template rendering
Templates route configuration
Caddy route for template processing
// Process HTML files as templatesconst route = buildTemplatesRoute({ path: "/*.html", fileRoot: "/var/www/templates", mimeTypes: ["text/html"],});// With custom delimitersconst route = buildTemplatesRoute({ path: "/*.tmpl", fileRoot: "/templates", delimiters: ["<%", "%>"],}); Copy
// Process HTML files as templatesconst route = buildTemplatesRoute({ path: "/*.html", fileRoot: "/var/www/templates", mimeTypes: ["text/html"],});// With custom delimitersconst route = buildTemplatesRoute({ path: "/*.tmpl", fileRoot: "/templates", delimiters: ["<%", "%>"],});
Build a templates route for server-side template rendering