anatolian2/lib/structured-data.ts
Temmuz Aslan 591d878ac6 Initial commit: The Anatolian Edit website
Next.js 14 website with standalone output configured for Docker deployment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 22:34:25 +03:00

162 lines
4.2 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Experience } from "./constants";
export function generateOrganizationSchema() {
return {
"@context": "https://schema.org",
"@type": "TravelAgency",
name: "The Anatolian Edit",
description: "Curated experiences on Istanbul's Asian side",
url: "https://theanatolianedit.com",
logo: "https://theanatolianedit.com/icons/logo.svg",
areaServed: {
"@type": "City",
name: "Istanbul",
addressCountry: "TR",
},
address: {
"@type": "PostalAddress",
streetAddress: "Caferağa Mahallesi",
addressLocality: "Kadıköy",
addressRegion: "Istanbul",
postalCode: "34710",
addressCountry: "TR",
},
geo: {
"@type": "GeoCoordinates",
latitude: 40.9833,
longitude: 29.0333,
},
telephone: "+905551234567",
email: "hello@theanatolianedit.com",
priceRange: "€€",
openingHoursSpecification: {
"@type": "OpeningHoursSpecification",
dayOfWeek: [
"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday",
],
opens: "08:00",
closes: "22:00",
},
paymentAccepted: "Credit Card, Cash",
aggregateRating: {
"@type": "AggregateRating",
ratingValue: "4.9",
reviewCount: "200",
bestRating: "5",
},
sameAs: ["https://www.instagram.com/theanatolianedit"],
};
}
export function generateLocalBusinessSchema() {
return {
"@context": "https://schema.org",
"@type": "LocalBusiness",
name: "The Anatolian Edit",
description: "Curated tour experiences on Istanbul's Asian side",
url: "https://theanatolianedit.com",
address: {
"@type": "PostalAddress",
streetAddress: "Caferağa Mahallesi",
addressLocality: "Kadıköy",
addressRegion: "Istanbul",
postalCode: "34710",
addressCountry: "TR",
},
geo: {
"@type": "GeoCoordinates",
latitude: 40.9833,
longitude: 29.0333,
},
telephone: "+905551234567",
priceRange: "€€",
openingHoursSpecification: {
"@type": "OpeningHoursSpecification",
dayOfWeek: [
"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday",
],
opens: "08:00",
closes: "22:00",
},
};
}
export function generateTouristTripSchema(experience: Experience) {
return {
"@context": "https://schema.org",
"@type": "TouristTrip",
name: `${experience.name}${experience.tagline}`,
description: experience.hook,
touristType: "Cultural tourism",
itinerary: experience.itinerary
? {
"@type": "ItemList",
itemListElement: experience.itinerary.map((stop, index) => ({
"@type": "ListItem",
position: index + 1,
name: `${stop.time}${stop.title}`,
description: stop.description,
})),
}
: undefined,
offers: {
"@type": "Offer",
price: experience.price.toString(),
priceCurrency: experience.currency,
availability: "https://schema.org/InStock",
validFrom: "2024-01-01",
},
provider: {
"@type": "TravelAgency",
name: "The Anatolian Edit",
url: "https://theanatolianedit.com",
},
};
}
export function generateFAQSchema(faqs: { question: string; answer: string }[]) {
return {
"@context": "https://schema.org",
"@type": "FAQPage",
mainEntity: faqs.map((faq) => ({
"@type": "Question",
name: faq.question,
acceptedAnswer: {
"@type": "Answer",
text: faq.answer,
},
})),
};
}
export function generateBreadcrumbSchema(
items: { name: string; url: string }[]
) {
return {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
itemListElement: items.map((item, index) => ({
"@type": "ListItem",
position: index + 1,
name: item.name,
item: item.url,
})),
};
}
export function generateAggregateRatingSchema() {
return {
"@context": "https://schema.org",
"@type": "Product",
name: "The Anatolian Edit Experiences",
aggregateRating: {
"@type": "AggregateRating",
ratingValue: "4.9",
reviewCount: "200",
bestRating: "5",
worstRating: "1",
},
};
}