docu v 1.11.0

This commit is contained in:
Wildan Nursahidan
2025-05-26 22:28:27 +07:00
parent bbf23b66eb
commit 3f6a407a30
57 changed files with 1742 additions and 3924 deletions

View File

@@ -0,0 +1,29 @@
import { BaseMdxFrontmatter, getAllChilds } from "@/lib/markdown";
import Link from "next/link";
export default async function Outlet({ path }: { path: string }) {
if (!path) throw new Error("path not provided");
const output = await getAllChilds(path);
return (
<div className="grid md:grid-cols-2 gap-5">
{output.map((child) => (
<ChildCard {...child} key={child.title} />
))}
</div>
);
}
type ChildCardProps = BaseMdxFrontmatter & { href: string };
function ChildCard({ description, href, title }: ChildCardProps) {
return (
<Link
href={href}
className="border rounded-md p-4 no-underline flex flex-col gap-0.5"
>
<h4 className="!my-0">{title}</h4>
<p className="text-sm text-muted-foreground !my-0">{description}</p>
</Link>
);
}