mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 01:47:17 +02:00
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:
parent
9ba28a378f
commit
5b79f2ebc2
8 changed files with 52 additions and 7 deletions
|
@ -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`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue