diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index a5014cd..32e4305 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -18,6 +18,16 @@ const { title = T.defaultTitle, description = T.defaultDesc } = Astro.props; const pathWithoutLocale = Astro.url.pathname.replace(/^\/ru/, "") || "/"; const enUrl = `https://randify.pro${getRelativeLocaleUrl("en", pathWithoutLocale)}`; const ruUrl = `https://randify.pro${getRelativeLocaleUrl("ru", pathWithoutLocale)}`; +const canonicalUrl = `https://randify.pro${Astro.url.pathname}`; + +const webPageSchema = { + "@context": "https://schema.org", + "@type": "WebPage", + name: title, + description: description, + url: canonicalUrl, + inLanguage: lang, +}; --- @@ -33,12 +43,18 @@ const ruUrl = `https://randify.pro${getRelativeLocaleUrl("ru", pathWithoutLocale href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap" rel="stylesheet" /> + +