From a34a0c609323f5aadba694d9f250d551985c8b04 Mon Sep 17 00:00:00 2001 From: striker Date: Thu, 21 May 2026 13:39:29 +0300 Subject: [PATCH] feat(seo): add security.txt, humans.txt, Schema.org JSON-LD --- public/.well-known/security.txt | 6 ++++++ public/humans.txt | 10 ++++++++++ src/layouts/BaseLayout.astro | 29 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 public/.well-known/security.txt create mode 100644 public/humans.txt diff --git a/public/.well-known/security.txt b/public/.well-known/security.txt new file mode 100644 index 0000000..739e7a8 --- /dev/null +++ b/public/.well-known/security.txt @@ -0,0 +1,6 @@ +Contact: mailto:admin@pushkinohistory.ru +Contact: https://pushkinohistory.ru/privacy/ +Expires: 2027-05-21T00:00:00.000Z +Preferred-Languages: ru, en +Canonical: https://pushkinohistory.ru/.well-known/security.txt +Policy: https://pushkinohistory.ru/privacy/ diff --git a/public/humans.txt b/public/humans.txt new file mode 100644 index 0000000..3ac7c84 --- /dev/null +++ b/public/humans.txt @@ -0,0 +1,10 @@ +/* SITE */ +Site: История города Пушкино — pushkinohistory.ru +Last update: 2026-05-21 +Standards: HTML5, CSS3, RSS 2.0 +Components: Astro 6, nginx 1.29 +Software: Docker, Gitea Actions + +/* TEAM */ +Maintained by: HHIVP +Contact: admin@pushkinohistory.ru diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 08e2c16..bf84665 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -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: + 'Краеведческое медиа: история, новости и фотолетопись подмосковного города Пушкино — от давних времён до наших дней.', + }, + ], +}; --- @@ -48,6 +75,8 @@ const ogImageUrl = new URL(ogImage, SITE_URL).toString(); +