- 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
61 lines
2.6 KiB
React
61 lines
2.6 KiB
React
import Link from 'next/link';
|
|
import { ArrowRight } from 'lucide-react';
|
|
import Header from '../../components/Header.jsx';
|
|
import Footer from '../../components/Footer.jsx';
|
|
import SectionHeading from '../../components/SectionHeading.jsx';
|
|
import Reveal from '../../components/Reveal.jsx';
|
|
import { serverApi } from '../../lib/serverApi.js';
|
|
import { getOrganizationSchema } from '../../lib/schema.js';
|
|
|
|
export const metadata = {
|
|
title: 'Блог',
|
|
description: 'Заметки об IT-инфраструктуре, кибербезопасности и автоматизации от TopSysOps.',
|
|
alternates: { canonical: '/blog' },
|
|
};
|
|
|
|
function formatDate(iso) {
|
|
if (!iso) return '';
|
|
return new Date(iso).toLocaleDateString('ru-RU', { day: 'numeric', month: 'long', year: 'numeric' });
|
|
}
|
|
|
|
export default async function BlogListPage() {
|
|
const [posts, orgSchema] = await Promise.all([serverApi.getBlogPosts(), getOrganizationSchema()]);
|
|
|
|
return (
|
|
<div>
|
|
{/* eslint-disable-next-line react/no-danger */}
|
|
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(orgSchema) }} />
|
|
<Header />
|
|
<section className="max-w-3xl mx-auto px-5 sm:px-8 py-20 min-h-[60vh]">
|
|
<SectionHeading
|
|
eyebrow="blog --articles"
|
|
title="Блог"
|
|
desc="Заметки об IT-инфраструктуре, кибербезопасности и автоматизации."
|
|
level="h1"
|
|
/>
|
|
|
|
{posts.length === 0 && <p className="text-sm text-slate-400">Пока нет опубликованных статей - загляните позже.</p>}
|
|
|
|
<div className="space-y-4">
|
|
{posts.map((p, i) => (
|
|
<Reveal key={p.id} delay={i * 60}>
|
|
<Link
|
|
href={`/blog/${p.slug}`}
|
|
className="block rounded-lg border p-5 transition-colors hover:border-emerald-500 bg-white border-slate-200 dark:bg-slate-900 dark:border-slate-800"
|
|
>
|
|
<p className="text-xs text-slate-400 dark:text-slate-500 mb-1 font-mono">{formatDate(p.published_at)}</p>
|
|
<h2 className="font-bold mb-2 font-display text-lg">{p.title}</h2>
|
|
{p.excerpt && <p className="text-sm text-slate-600 dark:text-slate-400 mb-2">{p.excerpt}</p>}
|
|
<span className="text-sm text-emerald-500 font-medium inline-flex items-center gap-1">
|
|
Читать <ArrowRight className="h-3.5 w-3.5" />
|
|
</span>
|
|
</Link>
|
|
</Reveal>
|
|
))}
|
|
</div>
|
|
</section>
|
|
<Footer />
|
|
</div>
|
|
);
|
|
}
|