source for getorbyt.com getorbyt.com/
client bsky orbytapp app orbyt bluesky getorbyt orbytvideo atproto video
0
fork

Configure Feed

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

Refactor Astro configuration and improve profile data handling.

- Updated astro.config.mjs to simplify the wrangler.jsonc path and added route inclusion strategy.
- Modified src/pages/@[handle].astro to safely access the ORBYT_API environment variable using optional chaining.

+6 -3
+5 -2
astro.config.mjs
··· 1 1 import { defineConfig } from 'astro/config'; 2 - import { resolve } from 'path'; 3 2 import cloudflare from '@astrojs/cloudflare'; 4 3 5 4 export default defineConfig({ ··· 7 6 adapter: cloudflare({ 8 7 imageService: 'cloudflare', 9 8 platformProxy: { 10 - configPath: resolve(process.cwd(), 'wrangler.jsonc'), 9 + configPath: 'wrangler.jsonc', 10 + }, 11 + routes: { 12 + strategy: 'include', 13 + include: ['/@*', '/@*/*'], 11 14 }, 12 15 }), 13 16 });
+1 -1
src/pages/@[handle].astro
··· 28 28 const nextCursor = videoFeed.cursor; 29 29 30 30 // Fetch profile colors via Service Binding 31 - const colorData = profileData.did && env.ORBYT_API 31 + const colorData = profileData.did && env?.ORBYT_API 32 32 ? await getColor(profileData.did, env.ORBYT_API) 33 33 : null; 34 34