Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/changelog-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ All changes included in 1.8:
- ([#5538](https://github.com/quarto-dev/quarto-cli/issues/5538)): Fix code-copy button style so that scrolling behaves properly.
- ([#10983](https://github.com/quarto-dev/quarto-cli/issues/10983)): Fix spacing inconsistency between paras and first section headings.
- ([#12259](https://github.com/quarto-dev/quarto-cli/issues/12259)): Fix conflict between `html-math-method: katex` and crossref popups (author: @benkeks).
- ([#12341](https://github.com/quarto-dev/quarto-cli/issues/12341)): Enable light and dark logos for html formats (sidebar, navbar, dashboard).
- ([#12734](https://github.com/quarto-dev/quarto-cli/issues/12734)): `highlight-style` now correctly supports setting a different `light` and `dark`.
- ([#12747](https://github.com/quarto-dev/quarto-cli/issues/12747)): Ensure `th` elements are properly restored when Quarto's HTML table processing is happening.
- ([#12766](https://github.com/quarto-dev/quarto-cli/issues/12766)): Use consistent equation numbering display for `html-math-method` and `html-math-method.method` for MathJax and KaTeX (author: @mcanouil)
- ([#12797](https://github.com/quarto-dev/quarto-cli/issues/12797)): Allow light and dark brands to be specified in one file, by specializing colors with `light:` and `dark:`.
- ([#12919](https://github.com/quarto-dev/quarto-cli/issues/12919)): Ensure `kbd` shortcode output has hover tooltip.
- ([#12981](https://github.com/quarto-dev/quarto-cli/issues/12981)): Brand should be applied in dark mode when dark mode is enabled by the theme, not the brand.

### `revealjs`

Expand Down
13 changes: 11 additions & 2 deletions src/command/render/render-contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import {
import { ExtensionContext } from "../../extension/types.ts";
import { NotebookContext } from "../../render/notebook/notebook-types.ts";
import { safeCloneDeep } from "../../core/safe-clone-deep.ts";
import { darkModeDefaultMetadata } from "../../format/html/format-html-info.ts";

export async function resolveFormatsFromMetadata(
metadata: Metadata,
Expand Down Expand Up @@ -569,8 +570,16 @@ async function resolveFormats(

// resolve brand in project and forward it to format
const brand = await project.resolveBrand(target.source);
mergedFormats[format].render.brand = brand;

if (brand) {
mergedFormats[format].render.brand = {
light: brand.light,
dark: (brand.enablesDarkMode ||
darkModeDefaultMetadata(mergedFormats[format].metadata) !==
undefined)
? brand.dark
: undefined,
};
}
// apply defaults from brand yaml under the metadata of the current format
const brandFormatDefaults: Metadata =
(brand?.light?.data?.defaults?.quarto as unknown as Record<
Expand Down
Loading
Loading