feat(docs): fix build issues, add external links

This commit is contained in:
rzmk 2025-12-02 20:30:37 -05:00
parent 0fdbdd4d1c
commit 100165ec29
5 changed files with 52 additions and 11 deletions

View file

@ -1,19 +1,42 @@
import Link from 'next/link';
import Link from "next/link";
export default function HomePage() {
return (
<main className="flex flex-1 flex-col justify-center text-center">
<h1 className="mb-4 text-2xl font-bold">ckanaction</h1>
<p className="text-fd-muted-foreground">
You can open{' '}
You can open{" "}
<Link
href="/docs"
className="text-fd-foreground font-semibold underline"
>
/docs
</Link>{' '}
</Link>{" "}
and see the interactive documentation.
</p>
<footer className="absolute bottom-2 ml-4 flex flex-col bg-brand-secondary text-brand-secondary-foreground rounded-2xl">
<p className="text-xs">
Provided by{" "}
<a
href="https://dathere.com"
target="_blank"
className="font-medium text-blue-400"
rel="noopener"
>
datHere
</a>
.{" "}
<a
href="https://dathere.com/privacy-policy/"
target="_blank"
className="font-medium text-blue-400"
rel="noopener"
>
Privacy Policy
</a>
.
</p>
</footer>
</main>
);
}

View file

@ -1,23 +1,25 @@
import { getPageImage, source } from '@/lib/source';
import { createRelativeLink } from "fumadocs-ui/mdx";
import {
DocsBody,
DocsDescription,
DocsPage,
DocsTitle,
} from 'fumadocs-ui/page';
import { notFound } from 'next/navigation';
import { getMDXComponents } from '@/mdx-components';
import type { Metadata } from 'next';
import { createRelativeLink } from 'fumadocs-ui/mdx';
} from "fumadocs-ui/page";
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { getPageImage, source } from "@/lib/source";
import { getMDXComponents } from "@/mdx-components";
export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
export default async function Page(props: PageProps<"/docs/[[...slug]]">) {
const params = await props.params;
const page = source.getPage(params.slug);
if (!page) notFound();
// @ts-expect-error
const MDX = page.data.body;
return (
// @ts-expect-error
<DocsPage toc={page.data.toc} full={page.data.full}>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
@ -38,7 +40,7 @@ export async function generateStaticParams() {
}
export async function generateMetadata(
props: PageProps<'/docs/[[...slug]]'>,
props: PageProps<"/docs/[[...slug]]">,
): Promise<Metadata> {
const params = await props.params;
const page = source.getPage(params.slug);