Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs about extname #30

Merged
merged 2 commits into from
Sep 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,15 @@ layout. This is overridden by a `layout` specified in the app or response
#### `extname=".handlebars"`
The string name of the file extension used by the templates.

If you change this from the default, you also need to change the ext (first argument) when registering the view engine with [app.engine](http://expressjs.com/api.html#app.engine)():

app.engine('hbs', exphbs({ extname: '.hbs'} ) );

Also, be sure to use that same extname when setting the default "[view engine](http://expressjs.com/api.html#app-settings)" setting:

app.set('view engine', 'hbs');


#### `handlebars=require('handlebars')`
The Handlebars module/implementation. This allows for the `ExpressHandlebars`
instance to use a different Handlebars module/implementation than that provided
Expand Down