From 53b0c12644184185242b24e6f14de1ec86f4f86f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 11:59:27 +0000 Subject: [PATCH 1/2] Initial plan From 07eb1630fa605252da2145ff8ff1def45602997d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Feb 2026 12:02:33 +0000 Subject: [PATCH 2/2] Fix Next.js 15+ compatibility and SEO metadata URLs Co-authored-by: naheel0 <191262736+naheel0@users.noreply.github.com> --- src/app/generate/[repo]/page.tsx | 6 +++--- src/app/layout.tsx | 7 +++++-- src/components/Generator/SearchInput.tsx | 3 +++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/generate/[repo]/page.tsx b/src/app/generate/[repo]/page.tsx index 28edc96..e388230 100644 --- a/src/app/generate/[repo]/page.tsx +++ b/src/app/generate/[repo]/page.tsx @@ -2,9 +2,9 @@ import type { Metadata } from "next"; import GeneratePageClient from "@/app/generate/GeneratePageClient"; interface PageProps { - params: { + params: Promise<{ repo: string; // e.g., "facebook/react" - }; + }>; } // Dynamic Metadata for SEO and social sharing @@ -21,7 +21,7 @@ export async function generateMetadata({ openGraph: { title: `README for ${repoDisplayName} | ReadmeGenAI`, description: `Generate a polished README.md for ${repoName} using ReadmeGenAI.`, - url: `https://readmegen-ai.vercel.app/generate/${repoName}`, + url: `/generate/${repoName}`, siteName: "ReadmeGenAI", images: [ { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c291958..8c75cfc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -31,7 +31,7 @@ export const metadata: Metadata = { title: "ReadmeGenAI – AI GitHub README Generator", description: "Automatically generate professional README files from your GitHub repositories using AI.", - url: "https://readmegen-ai.vercel.app", + url: "/", siteName: "ReadmeGenAI", images: [ { @@ -62,6 +62,9 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { + const siteUrl = + process.env.NEXT_PUBLIC_SITE_URL || "https://readmegen-ai.vercel.app"; + return ( @@ -77,7 +80,7 @@ export default function RootLayout({ operatingSystem: "Web", description: "AI-powered GitHub README generator that creates markdown documentation automatically.", - url: "https://readmegen-ai.vercel.app", + url: siteUrl, }), }} /> diff --git a/src/components/Generator/SearchInput.tsx b/src/components/Generator/SearchInput.tsx index 4ab474e..1f6d1fe 100644 --- a/src/components/Generator/SearchInput.tsx +++ b/src/components/Generator/SearchInput.tsx @@ -7,12 +7,14 @@ interface SearchInputProps { onGenerate: (url: string) => void; isLoading: boolean; initialValue?: string; // optional initial value + ariaLabel?: string; // optional aria-label for accessibility } export const SearchInput = ({ onGenerate, isLoading, initialValue, + ariaLabel, }: SearchInputProps) => { // Initialize state directly from initialValue once const [url, setUrl] = useState(initialValue || ""); @@ -46,6 +48,7 @@ export const SearchInput = ({ if (error) setError(null); }} placeholder="https://github.com/username/repo" + aria-label={ariaLabel} className={`w-full bg-zinc-900/50 border ${ error ? "border-red-500/50" : "border-white/10" } rounded-2xl py-6 pl-14 pr-40 text-white placeholder:text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all backdrop-blur-xl`}