Skip to content

Commit 8f80bd0

Browse files
docs: add different logos for light and dark modes (#1155)
Co-authored-by: Divyansh Singh <[email protected]>
1 parent e8cb73e commit 8f80bd0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/config/theme-configs.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Here it describes the settings for the VitePress default theme. If you're using
2121

2222
## logo
2323

24-
- Type: `string`
24+
- Type: `ThemeableImage`
2525

26-
Logo file to display in nav bar, right before the site title.
26+
Logo file to display in nav bar, right before the site title. Accepts a path string, or an object to set a different logo for light/dark mode.
2727

2828
```ts
2929
export default {
@@ -33,6 +33,11 @@ export default {
3333
}
3434
```
3535

36+
```ts
37+
type Image = string | { src: string; alt?: string }
38+
type ThemeableImage = Image | { light: Image; dark: Image }
39+
```
40+
3641
## siteTitle
3742
3843
- Type: `string | false`

0 commit comments

Comments
 (0)