sitemap
This commit is contained in:
@@ -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"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-b from-black/50 via-black/30 to-black/60" />
|
||||
@@ -302,6 +303,7 @@ export default function HomeClient({ lang, dict }: { lang: string; dict: any })
|
||||
src={venue.img}
|
||||
alt={venue.title}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 55vw, 50vw"
|
||||
className="object-cover transition-transform duration-700 group-hover:scale-105"
|
||||
/>
|
||||
<div className={`absolute inset-0 bg-gradient-to-t ${venue.color} to-transparent opacity-50`} />
|
||||
@@ -392,6 +394,7 @@ export default function HomeClient({ lang, dict }: { lang: string; dict: any })
|
||||
src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&q=60&w=1600"
|
||||
alt="Moy Group CTA Background"
|
||||
fill
|
||||
sizes="100vw"
|
||||
className="object-cover object-center"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -88,6 +88,7 @@ export default function GaleriClient({ lang, dict }: { lang: string; dict: any }
|
||||
src={img.src}
|
||||
alt={img.title}
|
||||
fill
|
||||
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||
className="object-cover transition-transform duration-700 group-hover:scale-110"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-[var(--color-moy-dark)]/0 group-hover:bg-[var(--color-moy-dark)]/50 transition-all duration-300 flex flex-col items-center justify-center gap-3">
|
||||
|
||||
@@ -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({
|
||||
<html
|
||||
lang={locale}
|
||||
className={`${cormorant.variable} ${montserrat.variable} h-full antialiased`}
|
||||
data-scroll-behavior="smooth"
|
||||
>
|
||||
<head>
|
||||
{/* VPS Panel Analytics */}
|
||||
<script defer src="https://panel.ayris.tech/api/analytics/script" data-domain="moygroup.com.tr"></script>
|
||||
<Script defer src="https://panel.ayris.tech/api/analytics/script" data-domain="moygroup.com.tr" />
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
|
||||
@@ -49,6 +49,7 @@ export function ImageCard({ src, alt, title, subtitle, badge, className }: Image
|
||||
src={src}
|
||||
alt={alt}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
||||
className="object-cover transition-transform duration-700 group-hover:scale-105"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-400" />
|
||||
|
||||
+28
-7
@@ -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',
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
+43
-11
@@ -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<string, string> = {};
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user