fix: missing titles

This commit is contained in:
TrèsAbhi committed 2024-08-28 17:47:29 -05:00
1 parent 6949b27aa7
commit 9566065160
2 files changed
+9 -1

No files matched your search

@@ -17,8 +17,12 @@ export default function Page({
)}/docs/${params.directory}/${params.document}.md`, )}/docs/${params.directory}/${params.document}.md`,
).then((response) => response.text()), ).then((response) => response.text()),
); );
const title = markdown.split('\n')[0].replaceAll(/[^a-zA-Z0-9 \.&]/g, '');
return ( return (
<>
<title>{title}</title>
<PageWrapper> <PageWrapper>
<Markdown <Markdown
options={{ options={{
@@ -36,5 +40,6 @@ export default function Page({
{markdown} {markdown}
</Markdown> </Markdown>
</PageWrapper> </PageWrapper>
</>
); );
} }
+4 -1
View File
@@ -6,6 +6,8 @@ import PageWrapper from '../../../components/PageWrapper';
export default async function Page() { export default async function Page() {
return ( return (
<>
<title>BlitzKit - Patch Notes</title>
<PageWrapper> <PageWrapper>
<Heading>BlitzKit patch notes</Heading> <Heading>BlitzKit patch notes</Heading>
@@ -21,6 +23,7 @@ export default async function Page() {
); );
})} })}
</Flex> </Flex>
</PageWrapper> </PageWrapper>{' '}
</>
); );
} }