diff --git a/docs/config/theme-configs.md b/docs/config/theme-configs.md index d06ef78c..f7df77f9 100644 --- a/docs/config/theme-configs.md +++ b/docs/config/theme-configs.md @@ -33,6 +33,20 @@ export default { } ``` +## siteTitle + +- Type: `string | false` + +You can customize this item to replace the default site title (`title` in app config) in nav. When set to `false`, title in nav will be disabled. Useful when you have `logo` that already contains the site title text. + +```ts +export default { + themeConfig: { + siteTitle: 'Hello World' + } +} +``` + ## footer - Type: `Footer` diff --git a/src/client/theme-default/components/VPNavBarTitle.vue b/src/client/theme-default/components/VPNavBarTitle.vue index 8d01217c..c09c06dc 100644 --- a/src/client/theme-default/components/VPNavBarTitle.vue +++ b/src/client/theme-default/components/VPNavBarTitle.vue @@ -9,8 +9,9 @@ const { hasSidebar } = useSidebar() diff --git a/types/default-theme.d.ts b/types/default-theme.d.ts index 1166d2ac..2a3dbedc 100644 --- a/types/default-theme.d.ts +++ b/types/default-theme.d.ts @@ -7,6 +7,12 @@ export namespace DefaultTheme { */ logo?: string + /** + * Custom site title in navbar. If the value is undefined, + * `config.title` will be used. + */ + siteTitle?: string | false + /** * The nav items. */