From ea09a4fb04293d686f9521f2c886be958f01cf10 Mon Sep 17 00:00:00 2001 From: AyrisAI Date: Sat, 16 May 2026 00:58:25 +0300 Subject: [PATCH] fix: update sitemap with pSeo pages, fix dynamic metadata placeholders, and add llms.txt --- app/layout.tsx | 151 +++++++++++++++++++++++------------------------- app/sitemap.ts | 20 ++++++- public/llms.txt | 27 +++++++++ 3 files changed, 118 insertions(+), 80 deletions(-) create mode 100644 public/llms.txt diff --git a/app/layout.tsx b/app/layout.tsx index 9a7502b..8f42a44 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -14,22 +14,22 @@ import sql from "@/lib/db"; export async function generateMetadata(): Promise { let settings: any = null; try { - const result = await sql`SELECT site_name, site_description FROM settings WHERE id = 1 LIMIT 1`; + const result = await sql`SELECT * FROM settings WHERE id = 1 LIMIT 1`; if (result.length > 0) settings = result[0]; } catch (e) { console.error(e); } - const siteName = settings?.site_name || "Muğla Dijital Medya Ajansı"; - const siteDesc = settings?.site_description || "Muğla Dijital Medya Ajansı olarak sosyal medya yönetimi, reklam yönetimi, SEO, web tasarım ve dijital pazarlama çözümleriyle markanızı öne çıkarıyoruz."; + const siteName = settings?.site_name || "Muğla Dijital | Medya & Prodüksiyon Ajansı"; + const siteDesc = settings?.site_description || "Muğla'nın öncü dijital medya ajansı. Drone çekimi, sosyal medya yönetimi ve profesyonel reklam çözümleri."; const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "https://mugladijitalmedya.com"; return { metadataBase: new URL(baseUrl), title: { - default: "Muğla Dijital | Medya & Prodüksiyon Ajansı", - template: "%s | Muğla Dijital" + default: siteName, + template: `%s | ${siteName.split('|')[0].trim()}` }, - description: "Muğla'nın öncü dijital medya ajansı. Drone çekimi, sosyal medya yönetimi ve profesyonel reklam çözümleri.", + description: siteDesc, authors: [{ name: "Muğla Dijital" }], creator: "Muğla Dijital", publisher: "Muğla Dijital", @@ -39,10 +39,10 @@ export async function generateMetadata(): Promise { openGraph: { type: "website", locale: "tr_TR", - url: "https://mugladijitalmedya.com", + url: baseUrl, siteName: "Muğla Dijital", - title: "Muğla Dijital | Medya & Prodüksiyon Ajansı", - description: "Profesyonel drone çekimi ve dijital medya çözümleri.", + title: siteName, + description: siteDesc, images: [ { url: "/og-image.jpg", @@ -54,99 +54,92 @@ export async function generateMetadata(): Promise { }, twitter: { card: "summary_large_image", - title: "Muğla Dijital | Medya & Prodüksiyon Ajansı", - description: "Dijital dünyada markanızı zirveye taşıyın.", + title: siteName, + description: siteDesc, images: ["/og-image.jpg"], }, robots: { index: true, follow: true, - googleBot: { - index: true, - follow: true, - 'max-video-preview': -1, - 'max-image-preview': 'large', - 'max-snippet': -1, - }, } }; } -export default function RootLayout({ +export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + let settings: any = null; + try { + const result = await sql`SELECT * FROM settings WHERE id = 1 LIMIT 1`; + if (result.length > 0) settings = result[0]; + } catch (e) { + console.error(e); + } + + const jsonLd = { + "@context": "https://schema.org", + "@type": "Organization", + "name": settings?.site_name || "Muğla Dijital Medya Ajansı", + "url": "https://mugladijitalmedya.com", + "logo": "https://mugladijitalmedya.com/logo.png", + "sameAs": [ + settings?.instagram_url, + settings?.twitter_url, + settings?.linkedin_url + ].filter(Boolean), + "contactPoint": { + "@type": "ContactPoint", + "telephone": settings?.contact_phone || "+90-252-XXX-XXXX", + "contactType": "customer service", + "areaServed": "TR", + "availableLanguage": ["Turkish", "English"] + } + }; + + const localBusinessLd = { + "@context": "https://schema.org", + "@type": "LocalBusiness", + "name": settings?.site_name || "Muğla Dijital Medya Ajansı", + "image": "https://mugladijitalmedya.com/og-image.jpg", + "@id": "https://mugladijitalmedya.com", + "url": "https://mugladijitalmedya.com", + "telephone": settings?.contact_phone || "+90-252-XXX-XXXX", + "address": { + "@type": "PostalAddress", + "streetAddress": settings?.office_address || "Muğla", + "addressLocality": "Muğla", + "addressRegion": "Muğla", + "postalCode": "48000", + "addressCountry": "TR" + }, + "geo": { + "@type": "GeoCoordinates", + "latitude": 37.2153, + "longitude": 28.3636 + }, + "openingHoursSpecification": { + "@type": "OpeningHoursSpecification", + "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + "opens": "09:00", + "closes": "18:00" + } + }; + return ( - + {children}