modify generatemetadata, add prettierrc (since biome doesn't support mdx)

This commit is contained in:
Morgan Dean
2025-06-25 12:00:33 -07:00
parent 91bb211a14
commit 652aa1652f
5 changed files with 46 additions and 35 deletions

View File

@@ -45,8 +45,11 @@ export async function generateMetadata(props: {
const page = source.getPage(params.slug);
if (!page) notFound();
let title = `c/ua Docs: ${page.data.title}`;
if (page.url.includes('api')) title = `c/ua API: ${page.data.title}`;
return {
title: page.data.title,
title,
description: page.data.description,
};
}

View File

@@ -1,34 +1,34 @@
import { DocsLayout } from "fumadocs-ui/layouts/docs";
import type { ReactNode } from "react";
import { baseOptions } from "@/app/layout.config";
import { source } from "@/lib/source";
import { CodeXml } from "lucide-react";
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import type { ReactNode } from 'react';
import { baseOptions } from '@/app/layout.config';
import { source } from '@/lib/source';
import { CodeXml } from 'lucide-react';
export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout
tree={source.pageTree}
sidebar={{
tabs: [
{
url: "/v1",
title: "API v1",
icon: <div
className="rounded-lg bg-blue-500/10 border max-md:p-1.5 p-1"
style={
{
color: 'var(--color-blue-500)',
} as object
}
>
<CodeXml />
</div>
},
],
}}
{...baseOptions}
>
{children}
</DocsLayout>
);
return (
<DocsLayout
tree={source.pageTree}
sidebar={{
tabs: [
{
url: '/v1',
title: 'API v1',
icon: (
<div
className="rounded-lg bg-blue-500/10 border max-md:p-1.5 p-1"
style={
{
color: 'var(--color-blue-500)',
} as object
}>
<CodeXml />
</div>
),
},
],
}}
{...baseOptions}>
{children}
</DocsLayout>
);
}