import { LOCALES } from '@barev/i18n'; import type { MetadataRoute } from 'next'; import { INDEXED_PATHS, languageAlternates, SITE } from '../lib/seo'; /** Все индексируемые страницы на 5 языках; у каждой — hreflang на все версии, включая саму себя */ export default function sitemap(): MetadataRoute.Sitemap { return INDEXED_PATHS.flatMap((path) => LOCALES.map((locale) => ({ url: `${SITE}/${locale}${path}`, changeFrequency: 'weekly' as const, priority: path === '' ? 1 : 0.8, alternates: { languages: languageAlternates(path, true) }, })), ); }