waibu-mpa
Version:
MPA support for Waibu Framework
35 lines (32 loc) • 3.71 kB
Markdown
# Config
Open/create ```<bajo-data-dir>/config/waibuMpa.json```:
| Key | Type | Default | Description |
| --- | ---- | ------------- | ----------- |
| ```mountMainAsRoot``` | ```boolean``` | ```true``` | Mount main plugin's routes as root. Set to ```false``` to have prefixed with ```/main``` |
| ```charset``` | ```string``` | ```utf-8``` | Used to set rendered page's character set |
| ```i18n``` | ```object``` | | | I18N settings |
| ```detectors``` | ```array``` | ```["qs"]``` | Language detector |
| ```session``` | ```object/boolean``` | ```<def>``` | [Session](https://github.com/fastify/session) settings. Set to ```false``` to disable session |
| ```emoji``` | ```boolean``` | ```true``` | Allow/disallow emoji rendering |
| ```viewEngine``` | ```object``` | | Default/built-in view engine settings |
| ```cacheMaxAge``` | ```number``` | ```0``` | Max of time a page template will be cached |
| ```theme``` | ```object/boolean``` | | Theme settings. Set to ```false``` to NOT use theme altogether |
| ```default``` | ```string``` | ```pure``` | Theme to use by default |
| ```autoInsert``` | ```array``` | ```<all>``` | Auto insert items from theme. Available options: ```meta```, ```css```, ```scripts``` |
| ```component``` | ```object``` | | Component settings |
| ```unknowntag``` | ```string``` | ```comment``` | Unknown tag handling: ```comment```, ```remove```, ```divReplace``` |
| ```insertCtagAsAttr``` | ```boolean``` | ```true``` | Set to ```true``` to insert component tag as attribute. Useful for debugging |
| ```defaultTag``` | ```string``` | ```div``` | Default tag to use if none is given |
| ```cacheMaxAge``` | ```number``` | ```0``` | Max of time a component template will be cached. *Default 'prod': 300* |
| ```iconset``` | ```object/boolean``` | | Iconset settings. Set to ```false``` to NOT use iconset at all |
| ```default``` | ```string``` | ```<none>``` | Which iconset is to use by default |
| ```autoInsert``` | ```array``` | ```<all>``` | Auto insert items from iconset. Available options: ```css```, ```scripts``` |
| ```prettier``` | ```object/boolean``` | ```<def>``` | [Prettier](https://prettier.io/docs/en/options) settings. Set to ```false``` to disable. *Default 'prod': false* |
| ```minifier``` | ```object/boolean``` | ```false``` | [Minifier](https://github.com/terser/html-minifier-terser) settings. Set to ```false``` to disable. *Default 'prod': ```<def>``` |
| ```markdown``` | ```object/boolean``` | ```<def>``` | Markdown settings. Require [Bajo Markdown](https://github.com/ardhi/bajo-markdown) to be loaded. Set to ```false``` to disable |
| ```multipart``` | ```object/boolean``` | ```<def>``` | [Multipart](https://github.com/fastify/fastify-multipart) settings. Set to ```false``` to disable |
| ```cors``` | ```object/boolean``` | ```<def>``` | [Cors](https://github.com/fastify/fastify-cors) settings. Set to ```false``` to disable |
| ```helmet``` | ```object/boolean``` | ```<def>``` | [Helmet](https://github.com/fastify/fastify-helmet) settings. Set to ```false``` to disable |
| ```compress``` | ```object/boolean``` | ```false``` | [Compress](https://github.com/fastify/fastify-compress) settings. Set to ```false``` to disable. *Default 'prod': ```<def>```* |
| ```rateLimit``` | ```object/boolean``` | ```false``` | [Rate limit](https://github.com/fastify/fastify-rate-limit) settings. Set to ```false``` to disable. *Default 'prod': ```<def>``` |
| ```disabled``` | ```array``` | ```[]``` | Route to be disabled |