@@ -13,6 +13,7 @@ import {
1313 kFilterParams ,
1414 kIncludeAfterBody ,
1515 kIpynbShellInteractivity ,
16+ kLogo ,
1617 kPlotlyConnected ,
1718 kTemplate ,
1819 kTheme ,
@@ -32,7 +33,7 @@ import { mergeConfigs } from "../../core/config.ts";
3233import { Document , Element } from "../../core/deno-dom.ts" ;
3334import { InternalError } from "../../core/lib/error.ts" ;
3435import { formatResourcePath } from "../../core/resources.ts" ;
35- import { ProjectContext } from "../../project/types.ts" ;
36+ import { kLogoAlt , ProjectContext } from "../../project/types.ts" ;
3637import { registerWriterFormatHandler } from "../format-handlers.ts" ;
3738import { kPageLayout , kPageLayoutCustom } from "../html/format-html-shared.ts" ;
3839import { htmlFormat } from "../html/format-html.ts" ;
@@ -64,6 +65,7 @@ import { processToolbars } from "./format-dashboard-toolbar.ts";
6465import { processDatatables } from "./format-dashboard-tables.ts" ;
6566import { assert } from "testing/asserts" ;
6667import { brandBootstrapSassBundles } from "../../core/sass/brand.ts" ;
68+ import { findLogo , normalizeLogoSpec } from "../../core/brand/brand.ts" ;
6769
6870const kDashboardClz = "quarto-dashboard" ;
6971
@@ -119,6 +121,19 @@ export function dashboardFormat() {
119121 }
120122 }
121123
124+ const brand = await project . resolveBrand ( input ) ;
125+ if ( format . metadata [ kLogo ] ) {
126+ format . metadata [ kLogo ] = await normalizeLogoSpec (
127+ brand ,
128+ format . metadata [ kLogo ] ,
129+ ) ;
130+ console . log ( "logo" , format . metadata [ kLogo ] ) ;
131+ } else if ( brand ) {
132+ const light = findLogo ( brand , "light" , [ "small" , "medium" , "large" ] ) ;
133+ const dark = findLogo ( brand , "dark" , [ "small" , "medium" , "large" ] ) ;
134+ format . metadata [ kLogo ] = { light, dark } ;
135+ }
136+
122137 const extras : FormatExtras = await baseHtmlFormat . formatExtras (
123138 input ,
124139 markdown ,
0 commit comments