Skip to content

Commit eb54e3a

Browse files
Merge pull request #11 from Shitanshukumar607/seo
added seo things
2 parents a1581be + 803a190 commit eb54e3a

File tree

5 files changed

+192
-1
lines changed

5 files changed

+192
-1
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 18
16+
node-version: 20
1717
cache: "npm"
1818
- run: npm install
1919
- run: npm run build
20+
env:
21+
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
22+
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}

app/sitemap.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import constantSEO from "@/lib/constantSEO";
2+
3+
export const metadata = {
4+
title: "Sitemap",
5+
};
6+
7+
export default function sitemap() {
8+
const baseUrl = constantSEO.baseUrl;
9+
const lastMod = new Date().toISOString();
10+
11+
return [
12+
// Homepage - Highest priority
13+
{
14+
url: baseUrl,
15+
lastModified: lastMod,
16+
changeFrequency: "daily",
17+
priority: 1.0,
18+
},
19+
// generate - High priority
20+
{
21+
url: `${baseUrl}/generate`,
22+
lastModified: lastMod,
23+
changeFrequency: "always",
24+
priority: 0.9,
25+
},
26+
// Collections - Medium priority
27+
{
28+
url: `${baseUrl}/collections`,
29+
lastModified: lastMod,
30+
changeFrequency: "daily",
31+
priority: 0.7,
32+
},
33+
// Badges - Medium priority
34+
];
35+
}

lib/constantSEO.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const constantSEO = {
2+
baseUrl: "https://svg-from-img.vercel.app",
3+
applicationName: "SVG from Img",
4+
5+
title: "SVG from Img - Convert Images to SVG Format",
6+
description:
7+
"Easily convert your images to SVG format with our online tool. Upload your image and get a scalable vector graphic in seconds.",
8+
9+
keywords: [
10+
"svg from img",
11+
"convert image to svg",
12+
"svg converter",
13+
"image to svg",
14+
"png to svg",
15+
"jpg to svg",
16+
"jpeg to svg",
17+
"online image to svg converter",
18+
"free svg converter",
19+
"vectorize image online",
20+
"raster to vector converter",
21+
"photo to svg",
22+
"image tracer online",
23+
"generate svg from image",
24+
"convert png to vector",
25+
"ai to svg converter",
26+
"svg maker",
27+
"image to vector converter",
28+
"online svg generator",
29+
"best svg converter tool",
30+
],
31+
};
32+
33+
export default constantSEO;

lib/seoMetadata.ts

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import constantSEO from "./constantSEO";
2+
3+
export const metadata = {
4+
metadataBase: new URL(constantSEO.baseUrl),
5+
6+
// General info
7+
applicationName: constantSEO.applicationName,
8+
generator: "Next.js",
9+
category: "Technology",
10+
11+
authors: [
12+
{
13+
name: "Shitanshu Kumar",
14+
url: "https://www.linkedin.com/in/shitanshukumar607",
15+
},
16+
],
17+
publisher: "Shitanshu Kumar",
18+
19+
// Title & Description
20+
title: {
21+
default: constantSEO.title,
22+
template: "%s | SVG from Img",
23+
},
24+
description: constantSEO.description,
25+
keywords: constantSEO.keywords,
26+
alternates: {
27+
canonical: constantSEO.baseUrl,
28+
},
29+
30+
// Icons & PWA
31+
// manifest: "/site.webmanifest",
32+
// icons: {
33+
// icon: [
34+
// { url: "/favicon.ico", sizes: "any" },
35+
// { url: "/favicon-32x32.png", type: "image/png", sizes: "32x32" },
36+
// { url: "/favicon-16x16.png", type: "image/png", sizes: "16x16" },
37+
// ],
38+
// apple: "/apple-touch-icon.png",
39+
// },
40+
41+
// Open Graph (Facebook, LinkedIn, etc.)
42+
openGraph: {
43+
title: constantSEO.title,
44+
description: constantSEO.description,
45+
url: constantSEO.baseUrl,
46+
siteName: constantSEO.applicationName,
47+
locale: "en_US",
48+
type: "website",
49+
// images: [
50+
// {
51+
// url: SiteAssets.SEO_Home,
52+
// width: 1200,
53+
// height: 630,
54+
// alt: constantSEO.applicationName,
55+
// }
56+
// ],
57+
},
58+
59+
// Twitter Card
60+
twitter: {
61+
card: "summary_large_image",
62+
title: constantSEO.title,
63+
description: constantSEO.description,
64+
// images: [
65+
// {
66+
// url: SiteAssets.SEO_Home,
67+
// width: 1200,
68+
// height: 630,
69+
// alt: constantSEO.applicationName,
70+
// }
71+
// ],
72+
},
73+
74+
// Robots & Crawling
75+
robots: {
76+
index: true,
77+
follow: true,
78+
googleBot: {
79+
index: true,
80+
follow: true,
81+
"max-video-preview": -1,
82+
"max-image-preview": "large",
83+
"max-snippet": -1,
84+
},
85+
},
86+
};

public/robots.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ====================================
2+
# 🤖 General Settings
3+
# ====================================
4+
5+
User-agent: *
6+
7+
# Block common sensitive paths
8+
Disallow: /admin
9+
Disallow: /api
10+
Disallow: /private
11+
Disallow: /.netlify
12+
13+
# Recommended Crawl Delay (some bots may ignore)
14+
Crawl-delay: 10
15+
16+
# ====================================
17+
# 🔍 Search Engine Specific Rules
18+
# ====================================
19+
20+
# Googlebot
21+
User-agent: Googlebot
22+
Allow: /generate
23+
Allow: /collections
24+
25+
# Bingbot
26+
User-agent: Bingbot
27+
Allow: /generate
28+
Allow: /collections
29+
30+
# ====================================
31+
# 📍 Sitemap
32+
# ====================================
33+
34+
Sitemap: https://svg-from-img.vercel.app/sitemap.xml

0 commit comments

Comments
 (0)