- 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
50 lines
2.3 KiB
React
50 lines
2.3 KiB
React
import './globals.css';
|
|
import { ThemeProvider } from '../components/ThemeProvider.jsx';
|
|
import SupportChat from '../components/SupportChat.jsx';
|
|
import VisitTracker from '../components/VisitTracker.jsx';
|
|
|
|
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://top-sysops.ru';
|
|
|
|
export const metadata = {
|
|
metadataBase: new URL(SITE_URL),
|
|
title: {
|
|
default: 'TopSysOps — IT-аутсорсинг и автоматизация',
|
|
template: '%s | TopSysOps',
|
|
},
|
|
description:
|
|
'Профессиональный IT-аутсорсинг: техподдержка, кибербезопасность, администрирование БД, сетевая инфраструктура, ИИ и автоматизация.',
|
|
};
|
|
|
|
// Выставляет класс "dark" на <html> ДО гидратации React, чтобы не было
|
|
// мигания светлой темы при заходе пользователя с сохранённой тёмной темой.
|
|
const NO_FLASH_SCRIPT = `
|
|
(function () {
|
|
try {
|
|
var theme = localStorage.getItem('ts-theme');
|
|
var dark = theme ? theme === 'dark' : window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
if (dark) document.documentElement.classList.add('dark');
|
|
} catch (e) {}
|
|
})();
|
|
`;
|
|
|
|
// Organization/LocalBusiness JSON-LD намеренно НЕ рендерится здесь: root layout
|
|
// в этом проекте частично запекается в статическую оболочку на этапе сборки
|
|
// (когда бэкенд ещё недоступен), и любые fetch-данные отсюда попадают в HTML
|
|
// устаревшими навсегда, даже с revalidate. Каждая страница вызывает
|
|
// getOrganizationSchema() сама - там это надёжно ревалидируется на каждый запрос.
|
|
export default function RootLayout({ children }) {
|
|
return (
|
|
<html lang="ru">
|
|
<head>
|
|
{/* eslint-disable-next-line react/no-danger */}
|
|
<script dangerouslySetInnerHTML={{ __html: NO_FLASH_SCRIPT }} />
|
|
</head>
|
|
<body className="bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100">
|
|
<ThemeProvider>{children}</ThemeProvider>
|
|
<SupportChat />
|
|
<VisitTracker />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|