From 5e818d804d5d38beff0f3754a006333752fd5082 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 22 Apr 2026 16:11:58 +0000 Subject: refactor: update schema handling and improve SEO metadata - Changed schema type from WithContext to Thing[] in Head, BaseLayout, and JsonLd components for better flexibility. - Added optional robots meta tag to Head component. - Updated JSON-LD generation in JsonLd component to include a structured payload. - Enhanced page and blog schemas to support breadcrumb and person schemas for improved SEO. - Introduced new utility schemas for website and person to streamline schema generation. - Refactored existing schemas to align with the new structure and ensure consistency across components. --- src/layouts/BaseLayout.astro | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/layouts') diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index ed3baeb..a2f0327 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,5 +1,5 @@ --- -import type { WithContext, Thing } from "schema-dts"; +import type { Thing } from "schema-dts"; import Analytics from "../components/Analytics.astro"; import Head from "../components/Head.astro"; import Header from "../components/Header.astro"; @@ -9,15 +9,16 @@ type Props = { readonly description: string; readonly lang: string; readonly preview: string; - readonly schema: WithContext; + readonly robots?: string; + readonly schema: Thing[]; readonly title: string; }; -const { description, lang, preview, schema, title } = Astro.props; +const { description, lang, preview, robots, schema, title } = Astro.props; --- - +
-- cgit v1.2.3