From c04bcca6f8dcc8c35e4c7cbf369a2cab9c340b64 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Tue, 30 Jun 2026 12:29:46 -0400 Subject: [PATCH] refactor(index): simplify homepage sections and add person schema --- src/pages/index.astro | 45 ++++++++++++++++++++++++++++++++++++++----- src/site.config.ts | 18 +++++++++++++++++ 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 69a3358..93e42ea 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,20 +2,20 @@ import { type CollectionEntry, getCollection } from "astro:content"; import PostPreview from "@/components/blog/PostPreview.astro"; import Project from "@/components/project/Project.astro"; -import SocialList from "@/components/SocialList.astro"; import { getAllPosts } from "@/data/post"; import { getAllSpeaking } from "@/data/speaking"; import PageLayout from "@/layouts/Base.astro"; +import { siteConfig, socialLinks } from "@/site.config"; import { collectionDateSort } from "@/utils/date"; -const MAX_POSTS = 5; +const MAX_POSTS = 4; const allPosts = await getAllPosts(); const latestPosts = (allPosts.sort(collectionDateSort) as CollectionEntry<"writing">[]).slice( 0, MAX_POSTS, ); -const MAX_PROJECTS = 3; +const MAX_PROJECTS = 2; const allProjects = await getCollection("projects"); const latestProjects = allProjects .sort(collectionDateSort) @@ -23,16 +23,42 @@ const latestProjects = allProjects const MAX_TALKS = 3; const latestTalks = (await getAllSpeaking()).sort(collectionDateSort).slice(0, MAX_TALKS); + +const meta = { + title: "Engineer & Founder", + description: + "Prad Nukala — engineer and founder building decentralized identity infrastructure. Explore my projects, experience, writing, and talks.", +}; + +const social = Object.fromEntries(socialLinks.map((s) => [s.friendlyName, s.link])); + +// Person structured data for richer search results. +const personSchema = { + "@context": "https://schema.org", + "@type": "Person", + name: siteConfig.author, + url: siteConfig.url, + jobTitle: "Engineer & Founder", + description: meta.description, + image: new URL("/avatar.png", siteConfig.url).href, + sameAs: socialLinks.filter((s) => !s.link.startsWith("mailto:")).map((s) => s.link), +}; --- - + +