mirror of
https://github.com/trycua/computer.git
synced 2026-01-05 21:09:58 -06:00
modify generatemetadata, add prettierrc (since biome doesn't support mdx)
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user