Skip to content

Commit 3334f4f

Browse files
authored
Update README.md
1 parent ebbb003 commit 3334f4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ var exphbs = require('express-handlebars');
9595

9696
var app = express();
9797

98-
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
98+
app.engine('handlebars', exphbs());
9999
app.set('view engine', 'handlebars');
100100

101101
app.get('/', function (req, res) {
@@ -124,6 +124,8 @@ The main layout is the HTML page wrapper which can be reused for the different v
124124
</html>
125125
```
126126

127+
You can use a different name for the default layout when registering Handlebars by passing the `defaultLayout` option, e.g. `exphbs({defaultLayout: 'name'})`.
128+
127129
**views/home.handlebars:**
128130

129131
The content for the app's home view which will be rendered into the layout's `{{{body}}}`.

0 commit comments

Comments
 (0)