feat: каркас v2 — Astro 5 + миграция 50 постов из WP + RSS для IPB Importer

- Astro 5 (6.3.6) minimal scaffold с Content Collections для posts/pages
- Тёмная палитра в духе старой темы darkness-10 (тонкая типографика Inter+Lora)
- Layout с шапкой/футером, главной-лентой, страницами категорий и одиночными постами
- RSS (общий + per-category) под IPB RSS Importer: RFC-822 pubDate,
  <guid isPermaLink="true">, <content:encoded> с CDATA, <lastBuildDate>
- RSS_CUTOFF фильтр: архив 2009-2015 на сайте остаётся, в RSS — только новые
- 50 постов и 6 страниц мигрированы из WP (anotherreflctions_ru @ db.hhivp.com)
  через scripts/migrate-wp.mjs (HTML→md без внешних зависимостей)
- sitemap.xml автоматически через @astrojs/sitemap
This commit is contained in:
2026-05-21 00:58:44 +03:00
parent b458cc6fa3
commit 0c3e248ccc
79 changed files with 8345 additions and 132 deletions

View File

@@ -0,0 +1,65 @@
---
import '../styles/global.css';
import { SITE_TITLE, SITE_DESCRIPTION, SITE_URL, SITE_LANG, MAIN_NAV } from '../consts';
interface Props {
title?: string;
description?: string;
ogType?: 'website' | 'article';
}
const { title, description, ogType = 'website' } = Astro.props;
const pageTitle = title ? `${title} — ${SITE_TITLE}` : SITE_TITLE;
const pageDesc = description || SITE_DESCRIPTION;
const canonical = new URL(Astro.url.pathname, SITE_URL).toString();
const year = new Date().getFullYear();
---
<!doctype html>
<html lang={SITE_LANG}>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{pageTitle}</title>
<meta name="description" content={pageDesc} />
<link rel="canonical" href={canonical} />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta property="og:type" content={ogType} />
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={pageDesc} />
<meta property="og:url" content={canonical} />
<meta property="og:site_name" content={SITE_TITLE} />
<meta property="og:locale" content="ru_RU" />
<link rel="alternate" type="application/rss+xml" title={`${SITE_TITLE} — RSS`} href="/feed.xml" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:wght@500;600;700&display=swap" rel="stylesheet" />
</head>
<body>
<header class="site-header">
<div class="site-header-inner">
<div>
<h1 class="site-title"><a href="/">{SITE_TITLE}</a></h1>
<span class="site-tagline">{SITE_DESCRIPTION}</span>
</div>
<nav>
<ul class="site-nav">
{MAIN_NAV.map((item) => (
<li><a href={item.href}>{item.label}</a></li>
))}
</ul>
</nav>
</div>
</header>
<main>
<slot />
</main>
<footer class="site-footer">
<p>© 2006{year} {SITE_TITLE} · <a href="/feed.xml">RSS</a> · <a href="/sitemap-index.xml">Sitemap</a></p>
</footer>
</body>
</html>