chore: clean up scratch files and apply remaining updates

This commit is contained in:
AyrisAI
2026-07-13 14:17:57 +03:00
parent 9866413511
commit 53cbee0841
28 changed files with 986 additions and 284 deletions
+22 -5
View File
@@ -3,19 +3,36 @@ import { Link } from '@/i18n/routing'
import { notFound } from 'next/navigation'
import { Calendar, Tag, ArrowLeft } from 'lucide-react'
import ListingCard from '@/components/ListingCard'
import type { Metadata } from 'next'
interface Props {
params: Promise<{ locale: string; slug: string }>
}
export async function generateMetadata({ params }: Props) {
const { slug } = await params
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { locale, slug } = await params
const post = await mockDb.getBlogPostBySlug(slug)
if (!post) return {}
const title = locale === 'en' ? post.titleEn : locale === 'ru' ? post.titleRu : post.titleTr
const content = locale === 'en' ? post.contentEn : locale === 'ru' ? post.contentRu : post.contentTr
const description = content.substring(0, 150)
const fullTitle = `${title} — Marmaris Local`
return {
title: `${post.titleTr} — Marmaris Local`,
description: post.contentTr.substring(0, 150)
title: fullTitle,
description,
openGraph: {
title: fullTitle,
description,
type: 'article',
...(post.coverImage ? { images: [{ url: post.coverImage }] } : {}),
},
twitter: {
card: 'summary_large_image',
title: fullTitle,
description,
},
}
}