aboutsummaryrefslogtreecommitdiff
path: root/src/pages/index.astro
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-04-22 19:11:58 +0300
committerValentin Popov <valentin@popov.link>2026-04-22 19:11:58 +0300
commit5e818d804d5d38beff0f3754a006333752fd5082 (patch)
tree7f2d1097390bbdb3c5fa1593f6d15d6dfb3b0dd8 /src/pages/index.astro
parent41bb3099660b6210a419c4190a1bc08d7ba58c00 (diff)
downloadpopov.link-5e818d804d5d38beff0f3754a006333752fd5082.tar.xz
popov.link-5e818d804d5d38beff0f3754a006333752fd5082.zip
refactor: update schema handling and improve SEO metadata
- Changed schema type from WithContext<Thing> 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.
Diffstat (limited to 'src/pages/index.astro')
-rw-r--r--src/pages/index.astro12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/pages/index.astro b/src/pages/index.astro
index b235b9b..b9c6400 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -3,21 +3,19 @@ import { config } from "../config";
import LatestPostsSection from "../components/Sections/LatestPosts.astro";
import Layout from "../layouts/BaseLayout.astro";
import pageSchema from "../utils/schemas/pageSchema";
+import personSchema from "../utils/schemas/personSchema";
import SocialLinksSection from "../components/Sections/SocialLinks.astro";
import WelcomeSection from "../components/Sections/Welcome.astro";
+import websiteSchema from "../utils/schemas/websiteSchema";
const title = "Valentin Popov – Software Developer & Team Lead | Tech Insights";
const description = "Blog by Valentin Popov — software developer and team lead writing about code, side projects, digital tools, and fun experiments.";
const preview = config.og.defaultPreview;
const lang = "en";
-const schema = pageSchema({
- siteUrl: new URL("/", Astro.site).toString(),
- page: "/",
- title,
- description,
- lang,
-});
+const siteUrl = new URL("/", Astro.site).toString();
+
+const schema = [websiteSchema({ siteUrl, name: config.og.website, description, lang }), personSchema({ siteUrl }), pageSchema({ siteUrl, page: "/", title, description, lang, type: "ProfilePage" })];
---
<Layout title={title} description={description} preview={preview} lang={lang} schema={schema}>