Skip to content

Commit

Permalink
feat(v2): automatically add base url to logo link (#2818)
Browse files Browse the repository at this point in the history
* feat(v2):  automatically add base url to logo link

* Fix for docs non-root path
  • Loading branch information
lex111 authored May 27, 2020
1 parent 2105700 commit 90db536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-classic/src/theme/hooks/useLogo.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import isInternalUrl from '@docusaurus/isInternalUrl';

const useLogo = () => {
const {
siteConfig: {baseUrl, themeConfig: {navbar: {logo = {}} = {}}} = {},
siteConfig: {themeConfig: {navbar: {logo = {}} = {}}} = {},
} = useDocusaurusContext();
const {isDarkTheme} = useThemeContext();
const logoLink = logo.href || baseUrl;
const logoLink = useBaseUrl(logo.href || '/');
let logoLinkProps = {};

if (logo.target) {
Expand Down

0 comments on commit 90db536

Please sign in to comment.