fix(seo): تطبیق کلمه کلیدی بی‌توجه به بزرگ/کوچکی حروف

This commit is contained in:
aramesh-site deploy
2026-10-07 08:41:30 +00:00
parent 99ecb0fa9f
commit cf6e71839b
@@ -23,7 +23,9 @@ export function useSeoChecks(input: SeoInput): Check[] {
const text = docToText(input.body)
const words = text.split(/\s+/).filter(Boolean)
const kp = input.keyphrase.trim()
const has = (s: string, needle: string) => s.includes(needle)
// تطبیق کلمه کلیدی بی‌توجه به بزرگ/کوچکی حروف — و نرمال‌سازی عربی/فارسی
const norm = (s: string) => s.toLowerCase().replace(/ي/g, 'ی').replace(/ك/g, 'ک')
const has = (s: string, needle: string) => norm(s).includes(norm(needle))
const checks: Check[] = []
// عنوان