Skip to content

Commit 323f379

Browse files
committed
feat: update API reference and redirect for API documentation
- Change API reference links to point to the new documentation site - Implement redirect for 'api-reference' paths to the new API documentation - Enhance API overview with additional sections and callouts for better user guidance - Remove outdated sections and files to streamline the documentation
1 parent 90b0d9d commit 323f379

File tree

24 files changed

+24
-1778
lines changed

24 files changed

+24
-1778
lines changed

app/(home)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function HomePage() {
1515
User Guide
1616
</Link>
1717
<Link
18-
href="/docs/api-reference"
18+
href="https://api-docs.multipost.app/"
1919
className="px-6 py-3 bg-fd-primary text-fd-primary-foreground rounded-md font-medium hover:bg-fd-primary/90 transition-colors"
2020
>
2121
API Reference

app/docs/[[...slug]]/page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ import {
55
DocsDescription,
66
DocsTitle,
77
} from 'fumadocs-ui/page';
8-
import { notFound } from 'next/navigation';
8+
import { notFound, redirect } from 'next/navigation';
99
import { createRelativeLink } from 'fumadocs-ui/mdx';
1010
import { getMDXComponents } from '@/mdx-components';
1111

1212
export default async function Page(props: {
1313
params: Promise<{ slug?: string[] }>;
1414
}) {
1515
const params = await props.params;
16+
17+
// 检查是否是 api-reference 开头的路径
18+
if (params.slug?.[0] === 'api-reference') {
19+
redirect('https://api-docs.multipost.app/');
20+
}
21+
1622
const page = source.getPage(params.slug);
1723
if (!page) notFound();
1824

content/docs/api-reference/extension/accounts.mdx

Lines changed: 0 additions & 32 deletions
This file was deleted.

content/docs/api-reference/extension/authentication.mdx

Lines changed: 0 additions & 43 deletions
This file was deleted.

content/docs/api-reference/extension/others.mdx

Lines changed: 0 additions & 33 deletions
This file was deleted.

content/docs/api-reference/extension/overview.mdx

Lines changed: 0 additions & 58 deletions
This file was deleted.

content/docs/api-reference/extension/publish.mdx

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)