From 8f80bd0122b663c39172f31d57ddbd95e2e5b326 Mon Sep 17 00:00:00 2001 From: Rijk van Zanten Date: Wed, 10 Aug 2022 15:14:47 -0400 Subject: [PATCH] docs: add different logos for light and dark modes (#1155) Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- docs/config/theme-configs.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/config/theme-configs.md b/docs/config/theme-configs.md index 924c84e10e1b..c43edcd1c50c 100644 --- a/docs/config/theme-configs.md +++ b/docs/config/theme-configs.md @@ -21,9 +21,9 @@ Here it describes the settings for the VitePress default theme. If you're using ## logo -- Type: `string` +- Type: `ThemeableImage` -Logo file to display in nav bar, right before the site title. +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. ```ts export default { @@ -33,6 +33,11 @@ export default { } ``` +```ts +type Image = string | { src: string; alt?: string } +type ThemeableImage = Image | { light: Image; dark: Image } +``` + ## siteTitle - Type: `string | false`