- Merge the duplicate Organization/LocalBusiness JSON-LD blocks (home's LocalBusiness + o-kompanii's Organization) into one shared getOrganizationSchema() call rendered on every page. Deliberately NOT wired through the root layout: fetches there get frozen into the static shell at build time (backend unreachable during image build) and never revalidate, silently serving stale data to crawlers - each page calls it directly instead, where revalidation is proven to work. - Add optional ItemList schema on /uslugi and Offer/OfferCatalog schema on /aktsii; entity pages (/uslugi/[slug] Service, /blog/[slug] Article) reference the organization via @id instead of duplicating it. - Add 8 more real FAQ entries (pricing model, contract terms, onboarding time, hybrid IT staff setup, supported stacks, backups, 152-FZ compliance, escalation) and give every FAQ its own slug and dedicated /faq/[slug] page with its own title/H1/FAQPage schema, modeled on the one-topic-per-page pattern (h/t remontka.pro). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013otXCiTZsxdZ4SJKZ9wUky
40 lines
1.5 KiB
JavaScript
40 lines
1.5 KiB
JavaScript
import { serverApi } from '../lib/serverApi.js';
|
|
|
|
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://top-sysops.ru';
|
|
|
|
export default async function sitemap() {
|
|
const [posts, services, faqs] = await Promise.all([
|
|
serverApi.getBlogPosts(),
|
|
serverApi.getServices(),
|
|
serverApi.getFaqs(),
|
|
]);
|
|
|
|
return [
|
|
{ url: `${SITE_URL}/`, changeFrequency: 'weekly', priority: 1.0 },
|
|
{ url: `${SITE_URL}/uslugi`, changeFrequency: 'weekly', priority: 0.9 },
|
|
...services.map((cat) => ({
|
|
url: `${SITE_URL}/uslugi/${cat.slug}`,
|
|
changeFrequency: 'monthly',
|
|
priority: 0.8,
|
|
})),
|
|
{ url: `${SITE_URL}/aktsii`, changeFrequency: 'weekly', priority: 0.7 },
|
|
{ url: `${SITE_URL}/keysy`, changeFrequency: 'monthly', priority: 0.6 },
|
|
{ url: `${SITE_URL}/o-kompanii`, changeFrequency: 'monthly', priority: 0.6 },
|
|
{ url: `${SITE_URL}/otzyvy`, changeFrequency: 'weekly', priority: 0.5 },
|
|
{ url: `${SITE_URL}/faq`, changeFrequency: 'monthly', priority: 0.5 },
|
|
...faqs.filter((f) => f.slug).map((f) => ({
|
|
url: `${SITE_URL}/faq/${f.slug}`,
|
|
changeFrequency: 'monthly',
|
|
priority: 0.4,
|
|
})),
|
|
{ url: `${SITE_URL}/kontakty`, changeFrequency: 'monthly', priority: 0.6 },
|
|
{ url: `${SITE_URL}/blog`, changeFrequency: 'weekly', priority: 0.7 },
|
|
...posts.map((p) => ({
|
|
url: `${SITE_URL}/blog/${p.slug}`,
|
|
lastModified: p.published_at ? new Date(p.published_at) : undefined,
|
|
changeFrequency: 'monthly',
|
|
priority: 0.6,
|
|
})),
|
|
];
|
|
}
|