WIP: My personal website
0

Configure Feed

Select the types of activity you want to include in your feed.

at main 975 B View raw
1import type { PageServerLoad } from './$types'; 2import { fetchSponsors } from '$lib/server/github'; 3import { fetchPublications } from '$lib/server/atproto/publications'; 4import { fetchLatestPosts } from '$lib/server/atproto/documents'; 5import { fetchSubscriberCounts } from '$lib/server/atproto/interactions'; 6import { fetchCurrentlyReading } from '$lib/server/atproto/books'; 7import { fetchNowPlaying } from '$lib/server/atproto/music'; 8 9export const load: PageServerLoad = async ({ fetch }) => { 10 const [sponsors, publications] = await Promise.all([fetchSponsors(fetch), fetchPublications()]); 11 12 // Stream the Free Time data (not awaited) so it loads behind skeletons instead of 13 // blocking the page — nowPlaying in particular hits rate-limited MusicBrainz APIs. 14 return { 15 sponsors, 16 publications, 17 latestPosts: fetchLatestPosts(), 18 subscriberCounts: fetchSubscriberCounts(), 19 currentlyReading: fetchCurrentlyReading(), 20 nowPlaying: fetchNowPlaying(fetch) 21 }; 22};