Use Handlebars
Add Handlebars templating with the @primate/handlebars module.
npm i @primate/handlebarsimport config from "primate/config";
import handlebars from "@primate/handlebars";
export default config({
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" });
},
});