mirror of
https://github.com/Dokploy/website.git
synced 2026-07-01 03:55:24 +02:00
feat: add robots and sitemap generation, enhance documentation page with copy markdown button
- 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.
This commit is contained in:
30
apps/docs/components/copy-markdown-button.tsx
Normal file
30
apps/docs/components/copy-markdown-button.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
"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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user