Skip to content

Commit

Permalink
Resolve website inputs even when there is no theme
Browse files Browse the repository at this point in the history
fixes #6285
  • Loading branch information
dragonstyle committed Dec 4, 2023
1 parent 78af8d6 commit f6a4acd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
22 changes: 22 additions & 0 deletions src/project/types/website/website-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,28 @@ export async function initWebsiteNavigation(project: ProjectContext) {
navigation.pageMargin = pageMargin;
}

export async function websiteNoThemeExtras(
project: ProjectContext,
source: string,
_flags: PandocFlags,
_format: Format,
_temp: TempContext,
): Promise<FormatExtras> {
return {
html: {
[kHtmlPostprocessors]: [
async (doc: Document): Promise<HtmlPostProcessResult> => {
await resolveProjectInputLinks(source, project, doc);
return Promise.resolve({
resources: [],
supporting: [],
});
},
],
},
};
}

export async function websiteNavigationExtras(
project: ProjectContext,
source: string,
Expand Down
9 changes: 8 additions & 1 deletion src/project/types/website/website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
ensureIndexPage,
initWebsiteNavigation,
websiteNavigationExtras,
websiteNoThemeExtras,
} from "./website-navigation.ts";

import { updateSitemap } from "./website-sitemap.ts";
Expand Down Expand Up @@ -132,7 +133,13 @@ export const websiteProjectType: ProjectType = {
format,
services.temp,
)
: {};
: await websiteNoThemeExtras(
project,
source,
flags,
format,
services.temp,
);

// add some title related variables
extras.pandoc = extras.pandoc || {};
Expand Down

0 comments on commit f6a4acd

Please sign in to comment.