Skip to content

Commit

Permalink
feat(theme): allow overriding logo link
Browse files Browse the repository at this point in the history
closes #1683
  • Loading branch information
brc-dd committed Aug 4, 2023
1 parent 09a4fdc commit 2a7422b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/theme-default/components/VPNavBarTitle.vue
Expand Up @@ -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>
Expand Down
5 changes: 5 additions & 0 deletions types/default-theme.d.ts
Expand Up @@ -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.
Expand Down

0 comments on commit 2a7422b

Please sign in to comment.