Skip to content

Commit af38ca5

Browse files
authored
docs: fix broken links (#1869)
1 parent 3b0ba8d commit af38ca5

File tree

110 files changed

+666
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+666
-296
lines changed
File renamed without changes.

docs/app/pages/[[...slug]]/page.tsx renamed to docs/app/about/page.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ import { getMDXComponents } from "@/util/mdx-components";
66
import { DocsBody } from "fumadocs-ui/page";
77
import { notFound } from "next/navigation";
88

9-
export default async function Page(props: {
10-
params: Promise<{ slug?: string[] }>;
11-
}) {
12-
const slug = (await props.params).slug || [];
13-
const page = source.getPage(slug);
9+
export default async function AboutPage() {
10+
const page = source.getPage(["about"]);
1411
if (!page) {
1512
notFound();
1613
}
@@ -30,15 +27,8 @@ export default async function Page(props: {
3027
);
3128
}
3229

33-
export async function generateStaticParams() {
34-
return source.generateParams();
35-
}
36-
37-
export async function generateMetadata(props: {
38-
params: Promise<{ slug?: string[] }>;
39-
}) {
40-
const slug = (await props.params).slug || [];
41-
const page = source.getPage(slug);
30+
export async function generateMetadata() {
31+
const page = source.getPage(["about"]);
4232
if (!page) {
4333
notFound();
4434
}

docs/app/layout.config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const baseOptions: Partial<DocsLayoutProps & HomeLayoutProps> = {
6464
},
6565
{
6666
text: "About",
67-
url: "/pages/about",
67+
url: "/about",
6868
active: "url",
6969
},
7070
{

docs/app/privacy-policy/layout.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { HomeLayout } from "fumadocs-ui/layouts/home";
2+
import type { ReactNode } from "react";
3+
import { baseOptions } from "@/app/layout.config";
4+
import { Footer } from "@/components/Footer";
5+
6+
export default function Layout({ children }: { children: ReactNode }) {
7+
return (
8+
<>
9+
<HomeLayout {...baseOptions}>{children}</HomeLayout>
10+
<Footer />
11+
</>
12+
);
13+
}

docs/app/privacy-policy/page.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import GitHubButton from "@/components/GitHubButton";
2+
import CTAButton from "@/components/CTAButton";
3+
import { source } from "@/lib/source/pages";
4+
import { getFullMetadata } from "@/util/getFullMetadata";
5+
import { getMDXComponents } from "@/util/mdx-components";
6+
import { DocsBody } from "fumadocs-ui/page";
7+
import { notFound } from "next/navigation";
8+
9+
export default async function PrivacyPolicyPage() {
10+
const page = source.getPage(["privacy-policy"]);
11+
if (!page) {
12+
notFound();
13+
}
14+
const MDXContent = page.data.body;
15+
16+
return (
17+
<div className="mx-auto max-w-3xl pt-8">
18+
<DocsBody>
19+
<MDXContent
20+
components={getMDXComponents({
21+
GitHubButton,
22+
CTAButton,
23+
})}
24+
/>
25+
</DocsBody>
26+
</div>
27+
);
28+
}
29+
30+
export async function generateMetadata() {
31+
const page = source.getPage(["privacy-policy"]);
32+
if (!page) {
33+
notFound();
34+
}
35+
36+
return getFullMetadata({
37+
title: page.data.title,
38+
description: page.data.description,
39+
path: page.url,
40+
ogImageTitle: page.data.imageTitle,
41+
});
42+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { HomeLayout } from "fumadocs-ui/layouts/home";
2+
import type { ReactNode } from "react";
3+
import { baseOptions } from "@/app/layout.config";
4+
import { Footer } from "@/components/Footer";
5+
6+
export default function Layout({ children }: { children: ReactNode }) {
7+
return (
8+
<>
9+
<HomeLayout {...baseOptions}>{children}</HomeLayout>
10+
<Footer />
11+
</>
12+
);
13+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import GitHubButton from "@/components/GitHubButton";
2+
import CTAButton from "@/components/CTAButton";
3+
import { source } from "@/lib/source/pages";
4+
import { getFullMetadata } from "@/util/getFullMetadata";
5+
import { getMDXComponents } from "@/util/mdx-components";
6+
import { DocsBody } from "fumadocs-ui/page";
7+
import { notFound } from "next/navigation";
8+
9+
export default async function TermsAndConditionsPage() {
10+
const page = source.getPage(["terms-and-conditions"]);
11+
if (!page) {
12+
notFound();
13+
}
14+
const MDXContent = page.data.body;
15+
16+
return (
17+
<div className="mx-auto max-w-3xl pt-8">
18+
<DocsBody>
19+
<MDXContent
20+
components={getMDXComponents({
21+
GitHubButton,
22+
CTAButton,
23+
})}
24+
/>
25+
</DocsBody>
26+
</div>
27+
);
28+
}
29+
30+
export async function generateMetadata() {
31+
const page = source.getPage(["terms-and-conditions"]);
32+
if (!page) {
33+
notFound();
34+
}
35+
36+
return getFullMetadata({
37+
title: page.data.title,
38+
description: page.data.description,
39+
path: page.url,
40+
ogImageTitle: page.data.imageTitle,
41+
});
42+
}

docs/app/thanks/layout.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { HomeLayout } from "fumadocs-ui/layouts/home";
2+
import type { ReactNode } from "react";
3+
import { baseOptions } from "@/app/layout.config";
4+
import { Footer } from "@/components/Footer";
5+
6+
export default function Layout({ children }: { children: ReactNode }) {
7+
return (
8+
<>
9+
<HomeLayout {...baseOptions}>{children}</HomeLayout>
10+
<Footer />
11+
</>
12+
);
13+
}

docs/app/thanks/page.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import GitHubButton from "@/components/GitHubButton";
2+
import CTAButton from "@/components/CTAButton";
3+
import { source } from "@/lib/source/pages";
4+
import { getFullMetadata } from "@/util/getFullMetadata";
5+
import { getMDXComponents } from "@/util/mdx-components";
6+
import { DocsBody } from "fumadocs-ui/page";
7+
import { notFound } from "next/navigation";
8+
9+
export default async function ThanksPage() {
10+
const page = source.getPage(["thanks"]);
11+
if (!page) {
12+
notFound();
13+
}
14+
const MDXContent = page.data.body;
15+
16+
return (
17+
<div className="mx-auto max-w-3xl pt-8">
18+
<DocsBody>
19+
<MDXContent
20+
components={getMDXComponents({
21+
GitHubButton,
22+
CTAButton,
23+
})}
24+
/>
25+
</DocsBody>
26+
</div>
27+
);
28+
}
29+
30+
export async function generateMetadata() {
31+
const page = source.getPage(["thanks"]);
32+
if (!page) {
33+
notFound();
34+
}
35+
36+
return getFullMetadata({
37+
title: page.data.title,
38+
description: page.data.description,
39+
path: page.url,
40+
ogImageTitle: page.data.imageTitle,
41+
});
42+
}

docs/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export const auth = betterAuth({
211211
slug: PRODUCTS.starter.slug,
212212
},
213213
],
214-
successUrl: "/pages/thanks",
214+
successUrl: "/thanks",
215215
authenticatedUsersOnly: true,
216216
}),
217217
portal(),

0 commit comments

Comments
 (0)