diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 63d6cac..04d0b72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/app/sitemap.ts b/app/sitemap.ts new file mode 100644 index 0000000..0a7ba2b --- /dev/null +++ b/app/sitemap.ts @@ -0,0 +1,35 @@ +import constantSEO from "@/lib/constantSEO"; + +export const metadata = { + title: "Sitemap", +}; + +export default function sitemap() { + 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 + ]; +} diff --git a/lib/constantSEO.ts b/lib/constantSEO.ts new file mode 100644 index 0000000..5e193f8 --- /dev/null +++ b/lib/constantSEO.ts @@ -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; diff --git a/lib/seoMetadata.ts b/lib/seoMetadata.ts new file mode 100644 index 0000000..4512521 --- /dev/null +++ b/lib/seoMetadata.ts @@ -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, + }, + }, +}; diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..83ac453 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,34 @@ +# ==================================== +# 🤖 General Settings +# ==================================== + +User-agent: * + +# Block common sensitive paths +Disallow: /admin +Disallow: /api +Disallow: /private +Disallow: /.netlify + +# 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 + +# ==================================== +# 📍 Sitemap +# ==================================== + +Sitemap: https://svg-from-img.vercel.app/sitemap.xml \ No newline at end of file