feat: add og tags
Some checks failed
release-tag / build-and-deploy (push) Has been cancelled

This commit is contained in:
Zotov Ivan Yuryevich
2026-08-15 17:58:58 +03:00
parent 4b368d66e9
commit ed5677bcfb
13 changed files with 114 additions and 10 deletions

View File

@@ -6,6 +6,11 @@
// It is intentionally self-contained — no shared Layout and no Strapi data — so
// it renders even while the rest of the site is gated.
Astro.response.headers.set('X-Robots-Tag', 'noindex, nofollow')
// Same origin resolution as src/layouts/Layout.astro — og:image must be absolute.
const siteOrigin =
process.env.PUBLIC_SITE_URL || import.meta.env.PUBLIC_SITE_URL || Astro.url.origin
const ogImage = new URL('/logo.jpg', siteOrigin).href
---
<!doctype html>
@@ -15,6 +20,16 @@ Astro.response.headers.set('X-Robots-Tag', 'noindex, nofollow')
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<title>СОФТКЛИК — сайт в разработке</title>
<meta name="description" content="Сайт в разработке. Следите за обновлениями." />
<!-- Kept for messenger link previews (the preview link gets shared in chats);
indexing is still blocked by the robots meta above. -->
<meta property="og:type" content="website" />
<meta property="og:title" content="СОФТКЛИК — сайт в разработке" />
<meta property="og:description" content="Сайт в разработке. Следите за обновлениями." />
<meta property="og:site_name" content="СОФТКЛИК" />
<meta property="og:locale" content="ru_RU" />
<meta property="og:image" content={ogImage} />
<meta name="twitter:card" content="summary_large_image" />
</head>
<body>
<div class="screen">