diff --git a/next-sitemap.config.js b/next-sitemap.config.js index 0973f48..bd9bdb9 100644 --- a/next-sitemap.config.js +++ b/next-sitemap.config.js @@ -1,5 +1,40 @@ // next-sitemap.config.js +/** @type {import('next-sitemap').IConfig} */ module.exports = { - siteUrl: "https://readmegen-ai.vercel.app", // your site URL - generateRobotsTxt: true, // optional: creates robots.txt + siteUrl: "https://readmegen-ai.vercel.app", + generateRobotsTxt: true, + changefreq: "weekly", + priority: 0.7, + additionalPaths: async (config) => [ + { + loc: "/", + changefreq: "weekly", + priority: 1.0, + lastmod: new Date().toISOString(), + }, + { + loc: "/features", + changefreq: "monthly", + priority: 0.8, + lastmod: new Date().toISOString(), + }, + { + loc: "/examples", + changefreq: "monthly", + priority: 0.8, + lastmod: new Date().toISOString(), + }, + { + loc: "/docs", + changefreq: "monthly", + priority: 0.8, + lastmod: new Date().toISOString(), + }, + { + loc: "/generate", + changefreq: "weekly", + priority: 0.9, + lastmod: new Date().toISOString(), + }, + ], }; diff --git a/src/app/docs/page.tsx b/src/app/docs/page.tsx index 56cd4d9..5953682 100644 --- a/src/app/docs/page.tsx +++ b/src/app/docs/page.tsx @@ -1,3 +1,4 @@ +import type { Metadata } from "next"; import { Navbar } from "@/components/layout/Navbar"; import { Footer } from "@/components/layout/Footer"; import { QuickStart } from "@/components/docs/QuickStart"; @@ -5,9 +6,71 @@ import { DocSections } from "@/components/docs/DocSections"; import { FAQ } from "@/components/docs/FAQ"; import { navLinks } from "@/constants/navLinks"; +export const metadata: Metadata = { + title: "Documentation | ReadmeGenAI", + description: + "Learn how to use ReadmeGenAI, the AI README generator for GitHub. Quick-start guides, API docs, FAQs, and tips for perfect GitHub README files.", + openGraph: { + title: "Documentation | ReadmeGenAI", + description: + "Learn how to use ReadmeGenAI, the AI README generator for GitHub. Quick-start guides, API docs, FAQs, and tips for perfect GitHub README files.", + url: "/docs", + }, +}; + +const faqJsonLd = { + "@context": "https://schema.org", + "@type": "FAQPage", + mainEntity: [ + { + "@type": "Question", + name: "How does the AI analyze my code?", + acceptedAnswer: { + "@type": "Answer", + text: "We use AST parsing and heuristic analysis to identify entry points and dependencies without storing your actual source code.", + }, + }, + { + "@type": "Question", + name: "Can I use this for private repos?", + acceptedAnswer: { + "@type": "Answer", + text: "Yes, by connecting your GitHub account, we can securely analyze private repositories with your permission.", + }, + }, + ], +}; + +const breadcrumbJsonLd = { + "@context": "https://schema.org", + "@type": "BreadcrumbList", + itemListElement: [ + { + "@type": "ListItem", + position: 1, + name: "Home", + item: "https://readmegen-ai.vercel.app/", + }, + { + "@type": "ListItem", + position: 2, + name: "Documentation", + item: "https://readmegen-ai.vercel.app/docs", + }, + ], +}; + export default function DocsPage() { return (
+