Skip to content

Commit 30a015e

Browse files
committed
Properly support load paths for revealjs extensions
Fixes #3414
1 parent 10b264c commit 30a015e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/format/reveal/format-reveal-theme.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ export async function revealTheme(
9393
copyMinimal(join(revealSrcDir, dir), join(revealDestDir, dir));
9494
});
9595

96+
// Resolve load paths
97+
const cssThemeDir = join(revealSrcDir, "css", "theme");
98+
const loadPaths = [
99+
join(cssThemeDir, "source"),
100+
join(cssThemeDir, "template"),
101+
];
102+
96103
// theme is either user provided scss or something in our 'themes' dir
97104
// (note that standard reveal scss themes must be converted to quarto
98105
// theme format so they can participate in the pipeline)
@@ -103,6 +110,7 @@ export async function revealTheme(
103110
(theme) => {
104111
const themePath = join(relative(Deno.cwd(), dirname(input)), theme);
105112
if (existsSync(themePath)) {
113+
loadPaths.push(join(dirname(input), dirname(themePath)));
106114
return themeLayer(themePath);
107115
} else {
108116
// alias revealjs theme names
@@ -144,13 +152,6 @@ export async function revealTheme(
144152
}
145153
userLayers.push(...themeLayers);
146154

147-
// Resolve load paths
148-
const cssThemeDir = join(revealSrcDir, "css", "theme");
149-
const loadPaths = [
150-
join(cssThemeDir, "source"),
151-
join(cssThemeDir, "template"),
152-
];
153-
154155
// Quarto layers
155156
const quartoLayers = [
156157
quartoBaseLayer(format, true, true, false, true),

0 commit comments

Comments
 (0)