feat(seo): add security.txt, humans.txt, Schema.org JSON-LD

This commit is contained in:
striker
2026-05-21 13:39:29 +03:00
parent cf17c6e432
commit a34a0c6093
3 changed files with 45 additions and 0 deletions

View File

@@ -26,6 +26,33 @@ const {
const fullTitle = title ? `${title} — ${SITE_TITLE}` : SITE_TITLE;
const url = canonical ?? new URL(Astro.url.pathname, SITE_URL).toString();
const ogImageUrl = new URL(ogImage, SITE_URL).toString();
const jsonLd = {
'@context': 'https://schema.org',
'@graph': [
{
'@type': 'WebSite',
'@id': `${SITE_URL}/#website`,
url: `${SITE_URL}/`,
name: SITE_TITLE,
description: SITE_DESCRIPTION,
inLanguage: 'ru-RU',
publisher: { '@id': `${SITE_URL}/#publisher` },
},
{
'@type': 'NewsMediaOrganization',
'@id': `${SITE_URL}/#publisher`,
name: SITE_TITLE,
url: `${SITE_URL}/`,
logo: {
'@type': 'ImageObject',
url: `${SITE_URL}/favicon.svg`,
},
description:
'Краеведческое медиа: история, новости и фотолетопись подмосковного города Пушкино — от давних времён до наших дней.',
},
],
};
---
<!doctype html>
@@ -48,6 +75,8 @@ const ogImageUrl = new URL(ogImage, SITE_URL).toString();
<meta property="og:site_name" content={SITE_TITLE} />
<meta name="twitter:card" content="summary_large_image" />
<script type="application/ld+json" is:inline set:html={JSON.stringify(jsonLd)} />
<Analytics />
</head>
<body>