Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/generate/[repo]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: [
{
Expand Down
7 changes: 5 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down Expand Up @@ -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 (
<html lang="en">
<head>
Expand All @@ -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,
}),
}}
/>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Generator/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "");
Expand Down Expand Up @@ -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`}
Expand Down