feat(og-image): add social card images for projects, experience, and talks

This commit is contained in:
Prad Nukala
2026-06-30 13:05:14 -04:00
parent f701c951e4
commit 2178cef232
11 changed files with 173 additions and 55 deletions
+2 -4
View File
@@ -6,7 +6,7 @@ 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";
import { collectionDateSort, projectDateSort } from "@/utils/date";
const MAX_POSTS = 4;
const allPosts = await getAllPosts();
@@ -17,9 +17,7 @@ const latestPosts = (allPosts.sort(collectionDateSort) as CollectionEntry<"writi
const MAX_PROJECTS = 2;
const allProjects = await getCollection("projects");
const latestProjects = allProjects
.sort(collectionDateSort)
.slice(0, MAX_PROJECTS) as CollectionEntry<"projects">[];
const latestProjects = allProjects.sort(projectDateSort).slice(0, MAX_PROJECTS);
const MAX_TALKS = 3;
const latestTalks = (await getAllSpeaking()).sort(collectionDateSort).slice(0, MAX_TALKS);