fix(v2): allow undefined favicon (#5054)

* fix(v2): allow undefined favicon

* fix snapshots
This commit is contained in:
Sébastien Lorber 2021-06-24 18:50:28 +02:00 committed by GitHub
parent 05c85c7be7
commit 138b4c9975
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 41 deletions

View file

@ -24,37 +24,6 @@ module.exports = {
};
```
### `favicon` {#favicon}
- Type: `string`
URL for site favicon. Example:
```js title="docusaurus.config.js"
module.exports = {
favicon: 'https://docusaurus.io/favicon.ico',
};
```
You can also use the favicon URL relative to the `static` directory of your site. For example, your site has the following directory structure:
```bash
.
├── README.md
├ # ... other files in root directory
└─ static
└── img
└── favicon.ico
```
So you can refer it like below:
```js title="docusaurus.config.js"
module.exports = {
favicon: 'img/favicon.ico',
};
```
### `url` {#url}
- Type: `string`
@ -81,6 +50,20 @@ module.exports = {
## Optional fields {#optional-fields}
### `favicon` {#favicon}
- Type: `string | undefined`
Path to your site favicon
Example, if your favicon is in `static/img/favicon.ico`:
```js title="docusaurus.config.js"
module.exports = {
favicon: '/img/favicon.ico',
};
```
### `trailingSlash` {#trailing-slash}
- Type: `boolean | undefined`