feat: implement programmatic SEO routes and optimize meta tags

This commit is contained in:
mstfyldz
2026-05-30 22:02:55 +03:00
parent fa9e3edcd8
commit 7872e8862d
16 changed files with 947 additions and 629 deletions
+13
View File
@@ -0,0 +1,13 @@
export function slugify(text: string) {
if (!text) return "";
const trMap: { [key: string]: string } = {
'ç': 'c', 'ğ': 'g', 'ı': 'i', 'ö': 'o', 'ş': 's', 'ü': 'u',
'Ç': 'C', 'Ğ': 'G', 'İ': 'I', 'Ö': 'O', 'Ş': 'S', 'Ü': 'U'
};
const normalized = text.replace(/[çğıöşüÇĞİÖŞÜ]/g, (match) => trMap[match]);
return normalized
.toLowerCase()
.replace(/[^a-z0-9 -]/g, '')
.replace(/\s+/g, '-')
.replace(/-+/g, '-');
}