You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`engine`|**Required**. The template engine object - pass in the return value of `require('<engine>')`||
108
108
|`production`| Enables caching of template files and render functions |`NODE_ENV === "production"`|
109
109
|`maxCache`| In `production` mode, maximum number of cached template files and render functions |`100`|
110
110
|`defaultContext`| Template variables available to all views. Variables provided on render have precedence and will **override** this if they have the same name. <br><br>Example: `{ siteName: "MyAwesomeSite" }`|`{}`|
111
111
|`propertyName`| The property that should be used to decorate `reply` and `fastify` <br><br>E.g. `reply.view()` and `fastify.view()` where `"view"` is the property name |`"view"`|
112
-
|`asyncPropertyName`| The property that should be used to decorate `reply` for async handler <br><br>Defaults to `${propertyName}Async` if `propertyName` is defined |`"viewAsync"`|
112
+
|`asyncPropertyName`| The property that should be used to decorate `reply` for async handler <br><br>Defaults to `${propertyName}Async` if `propertyName` is defined |`"viewAsync"`|
113
113
|`root`| The root path of your templates folder. The template name or path passed to the render function will be resolved relative to this path |`"./"`|
114
114
|`charset`| Default charset used when setting `Content-Type` header |`"utf-8"`|
115
115
|`includeViewExtension`| Automatically append the default extension for the used template engine **if omitted from the template name** . So instead of `template.hbs`, just `template` can be used |`false`|
116
116
|`viewExt`| Override the default extension for a given template engine. This has precedence over `includeViewExtension` and will lead to the same behavior, just with a custom extension. <br><br>Example: `"handlebars"`|`""`|
117
-
|`layout`| See [Layouts](#layouts) <br><br>This option lets you specify a global layout file to be used when rendering your templates. Settings like `root` or `viewExt` apply as for any other template file. <br><br>Example: `./templates/layouts/main.hbs`||
117
+
|`layout`| See [Layouts](#layouts) <br><br>This option lets you specify a global layout file to be used when rendering your templates. Settings like `root` or `viewExt` apply as for any other template file. <br><br>Example: `./templates/layouts/main.hbs`||
118
118
|`options`| See [Engine-specific settings](#engine-specific-settings)|`{}`|
0 commit comments