mirror of
https://github.com/Dokploy/website.git
synced 2026-06-15 20:25:25 +02:00
- Introduced `robots.ts` for defining robots.txt rules and sitemap URL. - Added `sitemap.ts` to generate a sitemap based on available documentation pages. - Enhanced the documentation page to include a "Copy as Markdown" button for easy copying of content. - Created `copy-markdown-button.tsx` component for clipboard functionality. - Implemented `llms.txt` route to provide a text-based overview of documentation links.
31 lines
758 B
TypeScript
31 lines
758 B
TypeScript
"use client";
|
|
|
|
import { useCopyButton } from "fumadocs-ui/utils/use-copy-button";
|
|
import { Check, Copy } from "lucide-react";
|
|
|
|
export function CopyMarkdownButton({ markdown }: { markdown: string }) {
|
|
const [checked, onClick] = useCopyButton(() => {
|
|
navigator.clipboard.writeText(markdown);
|
|
});
|
|
|
|
return (
|
|
<button
|
|
type="button"
|
|
className="inline-flex items-center gap-1.5 rounded-md border bg-fd-secondary px-3 py-1.5 text-xs font-medium text-fd-secondary-foreground transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground"
|
|
onClick={onClick}
|
|
>
|
|
{checked ? (
|
|
<>
|
|
<Check className="size-3.5" />
|
|
Copied!
|
|
</>
|
|
) : (
|
|
<>
|
|
<Copy className="size-3.5" />
|
|
Copy as Markdown
|
|
</>
|
|
)}
|
|
</button>
|
|
);
|
|
}
|