mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
feat(core): allow sourcing from multiple static directories (#4095)
* [WIP] Implementaion of multiple directory static sourcing * Move default to validation * Update test * Refactor * Port to MDX loader * Fix * Move dogfooding assets * Doc writeup * Restore assets * Support absolute paths * Dogfood absolute path * Fix * More tests * Fix snapshots Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
3f18c928bb
commit
1366c31201
43 changed files with 238 additions and 181 deletions
|
@ -361,6 +361,20 @@ Attempting to add unknown field in the config will lead to error in build time:
|
|||
Error: The field(s) 'foo', 'bar' are not recognized in docusaurus.config.js
|
||||
```
|
||||
|
||||
### `staticDirectories` {#staticdirectories}
|
||||
|
||||
An array of paths, relative to the site's directory or absolute. Files under these paths will be copied to the build output as-is.
|
||||
|
||||
- Type: `string[]`
|
||||
|
||||
Example:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
staticDirectories: ['static'],
|
||||
};
|
||||
```
|
||||
|
||||
### `scripts` {#scripts}
|
||||
|
||||
An array of scripts to load. The values can be either strings or plain objects of attribute-value maps. The `<script>` tags will be inserted in the HTML `<head>`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue