mirror of
https://github.com/dathere/ckanaction.git
synced 2025-12-19 08:49:26 +00:00
feat(docs): fix build issues, add external links
This commit is contained in:
parent
0fdbdd4d1c
commit
100165ec29
5 changed files with 52 additions and 11 deletions
|
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue