feat(#5): Use c.render() method instead of c.pug()

This commit is contained in:
Lucàs
2025-05-24 12:43:11 +02:00
parent c28ce76bd8
commit 2c93cfba79
2 changed files with 26 additions and 15 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ const app = new Hono();
app.use('*', pugRenderer(path.join(__dirname, 'views')));
app.get('/', (c) => {
return c.pug('index');
return c.render('index');
});
export default app;
@@ -58,7 +58,7 @@ You can pass options to the `pugRenderer` function to customize its behavior.
```javascript
app.get('/', (c) => {
return c.pug('index', {
return c.render('index', {
title: 'My Page',
message: 'Hello, world!'
});