2016-12-18 13:46:11 +01:00
|
|
|
# strapi-ejs
|
|
|
|
|
|
|
|
[](https://www.npmjs.org/package/strapi-ejs)
|
|
|
|
[](https://www.npmjs.org/package/strapi-ejs)
|
|
|
|
[](https://david-dm.org/strapi/strapi-ejs)
|
|
|
|
[](https://travis-ci.org/strapi/strapi)
|
|
|
|
[](http://slack.strapi.io)
|
|
|
|
|
|
|
|
This built-in hook allows you to use the EJS template engine with custom options.
|
|
|
|
|
2016-12-18 14:03:08 +01:00
|
|
|
# How To use
|
|
|
|
|
|
|
|
To configure your hook with custom options, you need to edit your `./config/hooks.json` file in your Strapi app.
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
hooks: {
|
|
|
|
...
|
|
|
|
websockets: true,
|
|
|
|
ejs: {
|
|
|
|
layout: layout, // Global layout file (default: layout)(set false to disable layout)
|
|
|
|
viewExt: ejs, // View file extension (default: ejs)
|
|
|
|
cache: true, // Cache compiled templates (default: true).
|
|
|
|
debug: true // Debug flag (default: false)
|
|
|
|
}
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2016-12-18 13:46:11 +01:00
|
|
|
## Resources
|
|
|
|
|
|
|
|
- [MIT License](LICENSE.md)
|
|
|
|
|
|
|
|
## Links
|
|
|
|
|
|
|
|
- [Strapi website](http://strapi.io/)
|
|
|
|
- [Strapi community on Slack](http://slack.strapi.io)
|
|
|
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|