mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
feat(v2): add baseUrlIssueBanner configuration to disable banner (#3802)
* add baseUrlIssueBanner configuration * handle review
This commit is contained in:
parent
9e314bcb11
commit
746a19f25b
11 changed files with 140 additions and 96 deletions
|
@ -424,3 +424,27 @@ module.exports = {
|
|||
titleDelimiter: '🦖', // Defaults to `|`
|
||||
};
|
||||
```
|
||||
|
||||
### `baseUrlIssueBanner`
|
||||
|
||||
- Type: `boolean`
|
||||
|
||||
When enabled, will show a banner in case your site can't load its CSS or JavaScript files, which is a very common issue, often related to a wrong `baseUrl` in site config.
|
||||
|
||||
Example:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
baseUrlIssueBanner: true, // Defaults to `true`
|
||||
};
|
||||
```
|
||||
|
||||

|
||||
|
||||
:::caution
|
||||
|
||||
This banner need to inline CSS / JS.
|
||||
|
||||
If you have a strict [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), you should rather disable it.
|
||||
|
||||
:::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue