diff --git a/src/project/types/website/website-shared.ts b/src/project/types/website/website-shared.ts index 204a5faec2..6fff5d2196 100644 --- a/src/project/types/website/website-shared.ts +++ b/src/project/types/website/website-shared.ts @@ -166,7 +166,7 @@ export async function websiteNavigationConfig(project: ProjectContext) { const projectBrand = await project.resolveBrand(); if ( - projectBrand && sidebars && sidebars[0] && projectBrand.processedData.logo + projectBrand?.processedData.logo && sidebars?.[0] ) { if (sidebars[0].logo === undefined) { const logo = projectBrand.processedData.logo.medium ?? @@ -180,6 +180,19 @@ export async function websiteNavigationConfig(project: ProjectContext) { } } + if ( + projectBrand?.processedData && navbar + ) { + const logo = projectBrand.processedData.logo.small ?? + projectBrand.processedData.logo.medium ?? + projectBrand.processedData.logo.large; + if (typeof logo === "string") { + navbar.logo = logo; + } else if (typeof logo === "object") { + navbar.logo = logo.light; // TODO: This needs smarts to work on light+dark themes + } + } + // if there is more than one sidebar then propagate options from the // first sidebar to the others if (sidebars && sidebars.length > 1) {