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
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "npm"
- run: npm install
- run: npm run build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
35 changes: 35 additions & 0 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import constantSEO from "@/lib/constantSEO";

export const metadata = {
title: "Sitemap",
};

Comment on lines +3 to +6
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] app/sitemap.ts is a metadata route (not a page) and Next.js ignores page metadata here. Removing this export avoids confusion and dead code.

Suggested change
export const metadata = {
title: "Sitemap",
};

Copilot uses AI. Check for mistakes.
export default function sitemap() {
Comment on lines +2 to +7
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Add an explicit return type for stronger typing with Next.js metadata routes. For example: import type { MetadataRoute } from 'next'; export default function sitemap(): MetadataRoute.Sitemap { ... }.

Suggested change
export const metadata = {
title: "Sitemap",
};
export default function sitemap() {
import type { MetadataRoute } from "next";
export const metadata = {
title: "Sitemap",
};
export default function sitemap(): MetadataRoute.Sitemap {

Copilot uses AI. Check for mistakes.
const baseUrl = constantSEO.baseUrl;
const lastMod = new Date().toISOString();

return [
// Homepage - Highest priority
{
url: baseUrl,
lastModified: lastMod,
changeFrequency: "daily",
priority: 1.0,
},
// generate - High priority
{
url: `${baseUrl}/generate`,
lastModified: lastMod,
changeFrequency: "always",
priority: 0.9,
},
// Collections - Medium priority
{
url: `${baseUrl}/collections`,
lastModified: lastMod,
changeFrequency: "daily",
priority: 0.7,
},
// Badges - Medium priority
];
}
33 changes: 33 additions & 0 deletions lib/constantSEO.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const constantSEO = {
baseUrl: "https://svg-from-img.vercel.app",
applicationName: "SVG from Img",

title: "SVG from Img - Convert Images to SVG Format",
description:
"Easily convert your images to SVG format with our online tool. Upload your image and get a scalable vector graphic in seconds.",

keywords: [
"svg from img",
"convert image to svg",
"svg converter",
"image to svg",
"png to svg",
"jpg to svg",
"jpeg to svg",
"online image to svg converter",
"free svg converter",
"vectorize image online",
"raster to vector converter",
"photo to svg",
"image tracer online",
"generate svg from image",
"convert png to vector",
"ai to svg converter",
"svg maker",
"image to vector converter",
"online svg generator",
"best svg converter tool",
],
};

export default constantSEO;
86 changes: 86 additions & 0 deletions lib/seoMetadata.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import constantSEO from "./constantSEO";

export const metadata = {
metadataBase: new URL(constantSEO.baseUrl),

// General info
applicationName: constantSEO.applicationName,
generator: "Next.js",
category: "Technology",

authors: [
{
name: "Shitanshu Kumar",
url: "https://www.linkedin.com/in/shitanshukumar607",
},
],
publisher: "Shitanshu Kumar",

// Title & Description
title: {
default: constantSEO.title,
template: "%s | SVG from Img",
},
description: constantSEO.description,
keywords: constantSEO.keywords,
alternates: {
canonical: constantSEO.baseUrl,
},

// Icons & PWA
// manifest: "/site.webmanifest",
// icons: {
// icon: [
// { url: "/favicon.ico", sizes: "any" },
// { url: "/favicon-32x32.png", type: "image/png", sizes: "32x32" },
// { url: "/favicon-16x16.png", type: "image/png", sizes: "16x16" },
// ],
// apple: "/apple-touch-icon.png",
// },

// Open Graph (Facebook, LinkedIn, etc.)
openGraph: {
title: constantSEO.title,
description: constantSEO.description,
url: constantSEO.baseUrl,
siteName: constantSEO.applicationName,
locale: "en_US",
type: "website",
// images: [
// {
// url: SiteAssets.SEO_Home,
// width: 1200,
// height: 630,
// alt: constantSEO.applicationName,
// }
// ],
},

// Twitter Card
twitter: {
card: "summary_large_image",
title: constantSEO.title,
description: constantSEO.description,
// images: [
// {
// url: SiteAssets.SEO_Home,
// width: 1200,
// height: 630,
// alt: constantSEO.applicationName,
// }
// ],
},

// Robots & Crawling
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
"max-video-preview": -1,
"max-image-preview": "large",
"max-snippet": -1,
},
},
Comment on lines +75 to +85
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] These directives advertise index/follow, but robots.txt currently blocks crawling for the wildcard agent. Align metadata and robots.txt to avoid mixed signals (either relax robots.txt as suggested, or adjust these flags to reflect the intended crawl policy).

Copilot uses AI. Check for mistakes.
};
34 changes: 34 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ====================================
# 🤖 General Settings
# ====================================

User-agent: *

# Block common sensitive paths
Disallow: /admin
Disallow: /api
Disallow: /private
Disallow: /.netlify
Comment on lines +7 to +11
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User-agent groups do not inherit rules. Because Googlebot and Bingbot have their own groups without any Disallow directives, those bots are currently allowed to crawl everything (including /admin, /api, etc.). Add the same Disallow lines under the Googlebot and Bingbot groups, or remove the UA-specific groups and rely on the wildcard group. For example, under each of Googlebot and Bingbot add: Disallow: /admin, Disallow: /api, Disallow: /private, Disallow: /.netlify.

Copilot uses AI. Check for mistakes.

# Recommended Crawl Delay (some bots may ignore)
Crawl-delay: 10

# ====================================
# 🔍 Search Engine Specific Rules
# ====================================

# Googlebot
User-agent: Googlebot
Allow: /generate
Allow: /collections

# Bingbot
User-agent: Bingbot
Allow: /generate
Allow: /collections
Comment on lines +23 to +28
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User-agent groups do not inherit rules. Because Googlebot and Bingbot have their own groups without any Disallow directives, those bots are currently allowed to crawl everything (including /admin, /api, etc.). Add the same Disallow lines under the Googlebot and Bingbot groups, or remove the UA-specific groups and rely on the wildcard group. For example, under each of Googlebot and Bingbot add: Disallow: /admin, Disallow: /api, Disallow: /private, Disallow: /.netlify.

Suggested change
Allow: /collections
# Bingbot
User-agent: Bingbot
Allow: /generate
Allow: /collections
Allow: /collections
Disallow: /admin
Disallow: /api
Disallow: /private
Disallow: /.netlify
# Bingbot
User-agent: Bingbot
Allow: /generate
Allow: /collections
Disallow: /admin
Disallow: /api
Disallow: /private
Disallow: /.netlify

Copilot uses AI. Check for mistakes.

# ====================================
# 📍 Sitemap
# ====================================

Sitemap: https://svg-from-img.vercel.app/sitemap.xml
Loading