Use Handlebars
Add Handlebars templating with the @primate/handlebars module.
npm i @primate/handlebarsimport app from "primate/app";
import handlebars from "@primate/handlebars";
export default app({
modules: [
handlebars(),
],
});<!-- components/Welcome.hbs -->
<h1>Hello, {{name}}!</h1>// routes/index.ts
import route from "primate/route";
import response from "primate/response";
export default route({
get() {
return response.view("Welcome.hbs", { name: "World" });
},
});