diff --git a/app/[lang]/HomeClient.tsx b/app/[lang]/HomeClient.tsx
index fbe27f5..930a825 100644
--- a/app/[lang]/HomeClient.tsx
+++ b/app/[lang]/HomeClient.tsx
@@ -125,6 +125,7 @@ export default function HomeClient({ lang, dict }: { lang: string; dict: any })
alt="Moy Group Hero"
fill
priority
+ sizes="100vw"
className="object-cover object-center"
/>
diff --git a/app/[lang]/layout.tsx b/app/[lang]/layout.tsx
index 0d690eb..c3a7b3f 100644
--- a/app/[lang]/layout.tsx
+++ b/app/[lang]/layout.tsx
@@ -5,6 +5,7 @@ import Footer from "../components/Footer";
import { MotionProvider } from "../components/MotionProvider";
import "../globals.css";
import { Locale, getDictionary } from "../dictionaries";
+import Script from "next/script";
const cormorant = Cormorant_Garamond({
variable: "--font-cormorant",
@@ -59,10 +60,11 @@ export default async function RootLayout({
{/* VPS Panel Analytics */}
-
+
diff --git a/app/robots.ts b/app/robots.ts
index 324ecfe..8e9fffa 100644
--- a/app/robots.ts
+++ b/app/robots.ts
@@ -1,11 +1,32 @@
-import { MetadataRoute } from 'next'
+
+
+import type { MetadataRoute } from 'next';
+
+const PROTECTED = ['/admin/', '/api/'];
export default function robots(): MetadataRoute.Robots {
return {
- rules: {
- userAgent: '*',
- allow: '/',
- },
+ rules: [
+ {
+ userAgent: '*',
+ allow: '/',
+ disallow: PROTECTED,
+ },
+ // AI arama / citation botları
+ { userAgent: 'OAI-SearchBot', allow: '/', disallow: PROTECTED },
+ { userAgent: 'ChatGPT-User', allow: '/', disallow: PROTECTED },
+ { userAgent: 'PerplexityBot', allow: '/', disallow: PROTECTED },
+ { userAgent: 'Perplexity-User', allow: '/', disallow: PROTECTED },
+ { userAgent: 'Claude-SearchBot', allow: '/', disallow: PROTECTED },
+ { userAgent: 'Claude-User', allow: '/', disallow: PROTECTED },
+ // Training crawler'ları engelle
+ { userAgent: 'GPTBot', disallow: '/' },
+ { userAgent: 'ClaudeBot', disallow: '/' },
+ { userAgent: 'Google-Extended', disallow: '/' },
+ { userAgent: 'CCBot', disallow: '/' },
+ { userAgent: 'Bytespider', disallow: '/' }, // ByteDance/TikTok
+ { userAgent: 'Meta-ExternalAgent', disallow: '/' }, // Meta training
+ ],
sitemap: 'https://moygroup.com.tr/sitemap.xml',
- }
-}
+ };
+}
\ No newline at end of file
diff --git a/app/sitemap.ts b/app/sitemap.ts
index 34c0bb9..0dbc74d 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -1,24 +1,56 @@
-import { MetadataRoute } from 'next'
-import { i18n } from './dictionaries'
+import type { MetadataRoute } from 'next';
+import { i18n } from './dictionaries';
+import fs from 'fs';
+import path from 'path';
export default function sitemap(): MetadataRoute.Sitemap {
- const baseUrl = 'https://moygroup.com.tr'
+ const baseUrl = 'https://moygroup.com.tr';
- // Public pages defined in the project
- const pages = ['', '/kurumsal', '/galeri', '/iletisim', '/menu', '/sss']
+ // Dynamically scan the app/[lang] folder for pages
+ const langDir = path.join(process.cwd(), 'app/[lang]');
+ let subfolders: string[] = [];
- const sitemapEntries: MetadataRoute.Sitemap = []
+ try {
+ if (fs.existsSync(langDir)) {
+ subfolders = fs.readdirSync(langDir).filter((file) => {
+ const filePath = path.join(langDir, file);
+ if (fs.statSync(filePath).isDirectory()) {
+ // Only include folders that contain a page.tsx file
+ return fs.existsSync(path.join(filePath, 'page.tsx'));
+ }
+ return false;
+ });
+ }
+ } catch (error) {
+ console.error('Error reading directories for sitemap:', error);
+ }
+
+ // Base page paths: home page ('') + dynamic folders
+ const pages = ['', ...subfolders.map((folder) => `/${folder}`)];
- for (const locale of i18n.locales) {
- for (const page of pages) {
+ const sitemapEntries: MetadataRoute.Sitemap = [];
+
+ for (const page of pages) {
+ // Generate language alternates for this page
+ const alternatesLanguages: Record
= {};
+ for (const locale of i18n.locales) {
+ alternatesLanguages[locale] = `${baseUrl}/${locale}${page}`;
+ }
+
+ // Add entries for all locales, providing localized alternates for each
+ for (const locale of i18n.locales) {
sitemapEntries.push({
url: `${baseUrl}/${locale}${page}`,
lastModified: new Date(),
changeFrequency: page === '' ? 'weekly' : 'monthly',
- priority: page === '' ? 1 : 0.8,
- })
+ priority: page === '' ? 1.0 : 0.8,
+ alternates: {
+ languages: alternatesLanguages,
+ },
+ });
}
}
- return sitemapEntries
+ return sitemapEntries;
}
+
diff --git a/package-lock.json b/package-lock.json
index 966b318..331423b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -615,9 +615,6 @@
"cpu": [
"arm"
],
- "libc": [
- "glibc"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -634,9 +631,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "glibc"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -653,9 +647,6 @@
"cpu": [
"ppc64"
],
- "libc": [
- "glibc"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -672,9 +663,6 @@
"cpu": [
"riscv64"
],
- "libc": [
- "glibc"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -691,9 +679,6 @@
"cpu": [
"s390x"
],
- "libc": [
- "glibc"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -710,9 +695,6 @@
"cpu": [
"x64"
],
- "libc": [
- "glibc"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -729,9 +711,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "musl"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -748,9 +727,6 @@
"cpu": [
"x64"
],
- "libc": [
- "musl"
- ],
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -767,9 +743,6 @@
"cpu": [
"arm"
],
- "libc": [
- "glibc"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -792,9 +765,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "glibc"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -817,9 +787,6 @@
"cpu": [
"ppc64"
],
- "libc": [
- "glibc"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -842,9 +809,6 @@
"cpu": [
"riscv64"
],
- "libc": [
- "glibc"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -867,9 +831,6 @@
"cpu": [
"s390x"
],
- "libc": [
- "glibc"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -892,9 +853,6 @@
"cpu": [
"x64"
],
- "libc": [
- "glibc"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -917,9 +875,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "musl"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -942,9 +897,6 @@
"cpu": [
"x64"
],
- "libc": [
- "musl"
- ],
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -1160,9 +1112,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1179,9 +1128,6 @@
"cpu": [
"arm64"
],
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1198,9 +1144,6 @@
"cpu": [
"x64"
],
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1217,9 +1160,6 @@
"cpu": [
"x64"
],
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1458,9 +1398,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1478,9 +1415,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1498,9 +1432,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -1518,9 +1449,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2071,9 +1999,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2088,9 +2013,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2105,9 +2027,6 @@
"loong64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2122,9 +2041,6 @@
"loong64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2139,9 +2055,6 @@
"ppc64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2156,9 +2069,6 @@
"riscv64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2173,9 +2083,6 @@
"riscv64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2190,9 +2097,6 @@
"s390x"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2207,9 +2111,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -2224,9 +2125,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MIT",
"optional": true,
"os": [
@@ -4899,9 +4797,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -4923,9 +4818,6 @@
"arm64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -4947,9 +4839,6 @@
"x64"
],
"dev": true,
- "libc": [
- "glibc"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [
@@ -4971,9 +4860,6 @@
"x64"
],
"dev": true,
- "libc": [
- "musl"
- ],
"license": "MPL-2.0",
"optional": true,
"os": [