Add comprehensive SEO: metadata, sitemap, robots, OG image, security headers#3
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ge, headers, README, LICENSE Co-authored-by: rowkav09 <230578460+rowkav09@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add comprehensive SEO improvements for visibility
Add comprehensive SEO: metadata, sitemap, robots, OG image, security headers
Mar 6, 2026
Owner
|
@copilot is it ready? |
Contributor
Author
Yes, all changes are in and the build passes with zero TypeScript errors and no CodeQL alerts. Here's what's included:
Ready to merge whenever you are. |
rowkav09
approved these changes
Mar 6, 2026
rowkav09
approved these changes
Mar 6, 2026
Owner
|
@copilot Let's merge |
Contributor
Author
I'm not able to merge pull requests directly — you'll need to click the Merge pull request button on the GitHub PR page to complete the merge. |
rowkav09
marked this pull request as ready for review
March 6, 2026 17:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves discoverability of
ghstats.devby adding full Next.js SEO infrastructure and enriching the README with keyword-dense content.App / metadata (
src/app/)layout.tsx— replaces minimal metadata with full SEO config:metadataBase, title template, 15-keyword array,openGraph/twittercard objects,alternates.canonical,robotsdirectives, and JSON-LDWebApplicationstructured data injected via<script type="application/ld+json">in<head>sitemap.ts— dynamicMetadataRoute.Sitemapreturning/(weekly, priority 1) and/api/card(daily, priority 0.8)robots.ts— disallows crawling of/api/card,/api/badge,/api/visits(SVG endpoints); points to sitemapopengraph-image.tsx— edge-rendered 1200×630 OG image vianext/ogImageResponse; auto-routed by Next.js file convention, eliminating hardcoded image pathsConfig (
next.config.mjs)Adds
headers()applied to all routes:README
Adds tagline, Why GitHub Profile Stats? bullet list, FAQ (targeting common search queries), Contributing, and Support sections. Existing badges and all prior content are untouched.
LICENSE
Adds MIT license file.
Original prompt
Overview
Add comprehensive SEO improvements to the
rowkav09/GitHub-profile-statsrepository to make it more visible on search engines (Google, Bing, etc.) and improve discoverability of the Vercel deployment athttps://ghstats.dev.IMPORTANT CONSTRAINTS
Changes Required
1.
src/app/layout.tsx— Comprehensive Next.js MetadataReplace the minimal metadata with a full SEO-optimized metadata export. The current file is:
Update it to include:
metadataBaseset tonew URL("https://ghstats.dev")titleas an object withdefault: "GitHub Profile Stats — Beautiful Stats Cards for Your README"andtemplate: "%s | GitHub Profile Stats"descriptione.g.:"Generate beautiful, dynamically generated GitHub stats cards for your profile README. 13 stats, 12 themes, fully customizable SVG cards — just paste one line. No tokens, no setup, no deployment needed. Free and open source."keywordsarray including:"github stats","github profile stats","github readme stats","github stats card","github profile readme","readme stats generator","github contribution stats","github streak stats","svg stats card","developer stats","github activity","open source","github readme generator","profile readme","github stats badge"authorswith name"rowkav09"and url"https://github.com/rowkav09"creator:"rowkav09"publisher:"rowkav09"openGraphobject with:title,description,url: "https://ghstats.dev",siteName: "GitHub Profile Stats",type: "website",locale: "en_US", andimagesarray with one image:{ url: "/og-image.png", width: 1200, height: 630, alt: "GitHub Profile Stats — Beautiful Stats Cards for Your README" }twitterobject with:card: "summary_large_image",title,description,images: ["/og-image.png"],creator: "@rowkav09"alternateswithcanonical: "https://ghstats.dev"robotswithindex: true,follow: true,googleBot: { index: true, follow: true, "max-video-preview": -1, "max-image-preview": "large", "max-snippet": -1 }iconsandAnalyticscomponent as-is.<script>tag inside the<head>section of the HTML. UseWebApplicationschema with properties:name,description,url,applicationCategory: "DeveloperApplication",operatingSystem: "All",offers: { "@type": "Offer", "price": "0", "priceCurrency": "USD" }, andauthorinfo.2. Create
src/app/sitemap.tsCreate a dynamic sitemap file that exports a default function returning an array of sitemap entries:
3. Create
src/app/robots.tsCreate a robots.txt generator:
The
/api/card,/api/badge, and/api/visitsroutes should be disallowed since they return SVGs/images, not HTML pages.4. Create
public/og-image.pngSince we can't easily generate an image file in the PR, instead create
src/app/opengraph-image.tsxusing Next.jsImageResponsefromnext/og: