Skip to content

Commit

Permalink
chore(docs): generate page titles for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Nov 4, 2023
1 parent f0adcf2 commit e6da4b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions apps/docs/scripts/utils/createMarkdownPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ export async function createMarkdownPage(

const contents = `${GENERATED_FILE_BANNER}
import { MarkdownPage } from "@/components/MarkdownPage/MarkdownPage.jsx";
import { type Metadata } from "next";
import { type ReactElement } from "react";
import Markdown from "./${markdownName}";
import { toc } from "./toc.js";
export const metadata: Metadata = {
title: \`\${toc[0].value} - react-md\`,
}
export default function GeneratedMarkdownPage(): ReactElement {
return <MarkdownPage toc={toc}><Markdown /></MarkdownPage>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type PropsWithChildren, type ReactElement } from "react";
import "./layout.scss";

export const metadata: Metadata = {
title: "Material icons and Symbols",
title: "Material icons and Symbols - react-md",
};

export default function MaterialIconsAndSymbolsLayout({
Expand Down

0 comments on commit e6da4b5

Please sign in to comment.