Files
ogrechkoandClaude Sonnet 5 1e4f97030a Consolidate Organization schema, add ItemList/Offer markup, expand FAQ
- 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
2026-08-26 00:57:07 +03:00

52 lines
2.0 KiB
React
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Header from '../../components/Header.jsx';
import Footer from '../../components/Footer.jsx';
import Promotions from '../../components/sections/Promotions.jsx';
import { ORGANIZATION_ID, getOrganizationSchema } from '../../lib/schema.js';
import { serverApi } from '../../lib/serverApi.js';
export const metadata = {
title: 'Акции на IT-аутсорсинг, техподдержку и почтовые серверы',
description:
'Актуальные акции и специальные предложения TopSysOps: скидки на IT-аутсорсинг при годовом договоре, почтовый сервер под ключ, бот с ИИ-ассистентом.',
alternates: { canonical: '/aktsii' },
};
function parsePrice(priceText) {
const digits = (priceText.match(/\d[\d\s ]*/) || [])[0];
if (!digits) return null;
const value = Number(digits.replace(/[\s ]/g, ''));
return Number.isFinite(value) && value > 0 ? value : null;
}
export default async function PromotionsPage() {
const [promotions, orgSchema] = await Promise.all([serverApi.getPromotions(), getOrganizationSchema()]);
const offersSchema = {
'@context': 'https://schema.org',
'@type': 'OfferCatalog',
name: 'Акции TopSysOps',
itemListElement: promotions.map((p) => {
const price = parsePrice(p.price_text);
return {
'@type': 'Offer',
name: p.title,
description: p.description,
seller: { '@id': ORGANIZATION_ID },
...(price ? { price, priceCurrency: 'RUB' } : {}),
};
}),
};
return (
<div>
{/* eslint-disable-next-line react/no-danger */}
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(orgSchema) }} />
{/* eslint-disable-next-line react/no-danger */}
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(offersSchema) }} />
<Header />
<Promotions promotions={promotions} showMailNote headingLevel="h1" />
<Footer />
</div>
);
}