mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
fix(v2): allow undefined favicon (#5054)
* fix(v2): allow undefined favicon * fix snapshots
This commit is contained in:
parent
05c85c7be7
commit
138b4c9975
7 changed files with 20 additions and 41 deletions
|
@ -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`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue