continue-custom/docs-site/components/docs/PageNav.tsx
Nate 606fba91a3 feat: add docs site as static Next.js export
Migrates the docs site from remote-config-server to this repo as a
standalone static Next.js app. Key changes:

- Copy app-docs from remote-config-server to docs-site/
- Configure `output: 'export'` for static HTML generation
- Replace API routes with build-time scripts (search index, image copy)
- Add generateStaticParams() to enumerate all doc slugs at build time
- Convert server-side redirects to client-side redirects
- Point DOCS_DIR to sibling ../docs directory
- Add GitHub Actions workflow for deploying to GitHub Pages
- Add missing Radix UI dependencies (accordion, tabs) to package.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 13:52:25 -07:00

42 lines
1.2 KiB
TypeScript

"use client";
import Link from "next/link";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { resolveHref } from "@/lib/resolveHref";
export function PageNav({
prev,
next,
}: {
prev: { slug: string; title: string } | null;
next: { slug: string; title: string } | null;
}) {
if (!prev && !next) return null;
return (
<div className="flex justify-between items-center mt-16 pt-6 border-t border-black/[0.06] dark:border-white/[0.06]">
{prev ? (
<Link
href={resolveHref(`/docs/${prev.slug}`)}
className="flex items-center gap-2 text-sm text-black/40 dark:text-white/40 hover:text-black/70 dark:hover:text-white/70 transition-colors no-underline"
>
<ChevronLeft className="h-4 w-4" />
<span>{prev.title}</span>
</Link>
) : (
<div />
)}
{next ? (
<Link
href={resolveHref(`/docs/${next.slug}`)}
className="flex items-center gap-2 text-sm text-black/40 dark:text-white/40 hover:text-black/70 dark:hover:text-white/70 transition-colors no-underline"
>
<span>{next.title}</span>
<ChevronRight className="h-4 w-4" />
</Link>
) : (
<div />
)}
</div>
);
}