This repository was archived by the owner on Nov 8, 2025. It is now read-only.
generated from javalin/javalin-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Pug4j templates #27
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
Support pug4j templates natively.
Additional context
I'm new to Java and I failed to register pug4j as a new engine.
// Register Pug4J template engine
JavalinRenderer.register((filePath, model, ctx) -> {
PugTemplate template = Pug4J.getTemplate(filePath);
return Pug4J.render(template, model);
}, ".pug");
app.get("/pug4j", ctx -> {
ctx.render("views/test.pug", model("firstName", "John", "lastName", "Doe"));
});Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request