Skip to content

Commit

Permalink
fix: docs bundles mdx against all other pages (#1560)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Sep 30, 2024
1 parent 49b552c commit fe71a34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/ui/app/src/util/resolveDocsContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export async function resolveDocsContent({
}
}
});
const allPages = Object.fromEntries(
Object.entries(pages).map(([key, value]) => {
return [key, value.markdown];
}),
);
const pageRecords = (
await Promise.all(
[...pageIds].map(async (pageId) => {
Expand All @@ -91,6 +96,7 @@ export async function resolveDocsContent({
markdown: await serializeMdx(pageContent.markdown, {
...mdxOptions,
filename: pageId,
files: { ...(mdxOptions?.files ?? {}), ...allPages },
}),
anchorTag: parseMarkdownPageToAnchorTag(pageContent.markdown),
};
Expand Down

0 comments on commit fe71a34

Please sign in to comment.