mirror of
https://github.com/trycua/computer.git
synced 2026-02-17 11:58:59 -06:00
modify generatemetadata, add prettierrc (since biome doesn't support mdx)
This commit is contained in:
8
docs/.prettierrc
Normal file
8
docs/.prettierrc
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"useTabs": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"bracketSpacing": true,
|
||||
"jsxBracketSameLine": true
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: C/ua Documentation
|
||||
description: C/ua Documentation
|
||||
title: Home
|
||||
description: c/ua Documentation Home
|
||||
---
|
||||
|
||||
## What is C/ua?
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"root": true,
|
||||
"defaultOpen": true,
|
||||
"pages": [
|
||||
"---[House]C/ua---",
|
||||
"---[House]c/ua---",
|
||||
"...cua",
|
||||
"---[Library]Libraries---",
|
||||
"...libraries",
|
||||
|
||||
@@ -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