Skip to content

Commit

Permalink
fix: restore feedback (in frontmatter) (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity authored Jul 9, 2024
1 parent 0e79be9 commit 730b5ea
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/ui/app/src/mdx/plugins/rehypeLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function rehypeFernLayout(opt: Options): (tree: Root, vfile: VFile) => vo

const children = tree.children as ElementContent[];
const subtitle = matter.subtitle != null ? wrapChildren(parseMarkdown(matter.subtitle)) : undefined;
const tableOfContents = matter["hide-toc"] ? undefined : makeToc(tree, matter["force-toc"]);
const tableOfContents = matter["hide-toc"] ?? false ? undefined : makeToc(tree, matter["force-toc"] ?? false);
const aside = wrapChildren(asideContents);
switch (matter.layout) {
case "custom":
Expand All @@ -48,7 +48,7 @@ export function rehypeFernLayout(opt: Options): (tree: Root, vfile: VFile) => vo
tableOfContents,
children,
editThisPageUrl: matter["edit-this-page-url"],
hideFeedback: matter["hide-feedback"],
hideFeedback: matter["hide-feedback"] ?? false,
});
case "page":
return toPageLayoutHastNode({
Expand All @@ -58,8 +58,8 @@ export function rehypeFernLayout(opt: Options): (tree: Root, vfile: VFile) => vo
tableOfContents,
children,
editThisPageUrl: matter["edit-this-page-url"],
hideFeedback: matter["hide-feedback"],
hideNavLinks: matter["hide-nav-links"],
hideFeedback: matter["hide-feedback"] ?? false,
hideNavLinks: matter["hide-nav-links"] ?? false,
});
case "reference":
return toReferenceLayoutHastNode({
Expand All @@ -69,7 +69,7 @@ export function rehypeFernLayout(opt: Options): (tree: Root, vfile: VFile) => vo
children,
aside,
editThisPageUrl: matter["edit-this-page-url"],
hideFeedback: matter["hide-feedback"],
hideFeedback: matter["hide-feedback"] ?? false,
});
default:
return toGuideLayoutHastNode({
Expand All @@ -79,8 +79,8 @@ export function rehypeFernLayout(opt: Options): (tree: Root, vfile: VFile) => vo
tableOfContents,
children,
editThisPageUrl: matter["edit-this-page-url"],
hideFeedback: matter["hide-feedback"],
hideNavLinks: matter["hide-nav-links"],
hideFeedback: matter["hide-feedback"] ?? false,
hideNavLinks: matter["hide-nav-links"] ?? false,
});
}
};
Expand Down

0 comments on commit 730b5ea

Please sign in to comment.