feat(theme): allow overriding logo link

closes #1683
pull/2736/head
Divyansh Singh 1 year ago
parent 09a4fdc9b8
commit 2a7422bbbf

@ -12,7 +12,7 @@ const { currentLang } = useLangs()
<template>
<div class="VPNavBarTitle" :class="{ 'has-sidebar': hasSidebar }">
<a class="title" :href="normalizeLink(currentLang.link)">
<a class="title" :href="theme.logoLink ?? normalizeLink(currentLang.link)">
<slot name="nav-bar-title-before" />
<VPImage v-if="theme.logo" class="logo" :image="theme.logo" />
<template v-if="theme.siteTitle">{{ theme.siteTitle }}</template>

@ -13,6 +13,11 @@ export namespace DefaultTheme {
*/
logo?: ThemeableImage
/**
* Overrides the link of the site logo.
*/
logoLink?: string
/**
* Custom site title in navbar. If the value is undefined,
* `config.title` will be used.

Loading…
Cancel
Save