feat(v2): site client modules (#3545)

* site client modules

* Update website/docs/api/docusaurus.config.js.md

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
This commit is contained in:
Sébastien Lorber 2020-10-07 13:44:14 +02:00 committed by GitHub
parent 9ba28a378f
commit 5b79f2ebc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 7 deletions

View file

@ -306,6 +306,23 @@ module.exports = {
};
```
### `clientModules`
An array of client modules to load globally on your site:
Example:
```js title="docusaurus.config.js"
module.exports = {
clientModules: [
require.resolve('./mySiteGlobalJs.js'),
require.resolve('./mySiteGlobalCss.css'),
],
};
```
See also: [`getClientModules()`](lifecycle-apis.md#getclientmodules).
### `ssrTemplate`
An HTML template written in [Eta's syntax](https://eta.js.org/docs/syntax#syntax-overview) that will be used to render your application. This can be used to set custom attributes on the `body` tags, additional `meta` tags, customize the `viewport`, etc. Please note that Docusaurus will rely on the template to be correctly structured in order to function properly, once you do customize it, you will have to make sure that your template is compliant with the requirements from `upstream`.