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>
18 lines
383 B
TypeScript
18 lines
383 B
TypeScript
import { resolveHref } from "@/lib/resolveHref";
|
|
|
|
export function MdxLink({
|
|
href,
|
|
children,
|
|
...props
|
|
}: React.AnchorHTMLAttributes<HTMLAnchorElement>) {
|
|
if (href?.startsWith("/")) {
|
|
const internalPath = href.startsWith("/docs") ? href : `/docs${href}`;
|
|
href = resolveHref(internalPath);
|
|
}
|
|
|
|
return (
|
|
<a href={href} {...props}>
|
|
{children}
|
|
</a>
|
|
);
|
|
}
|