Highly ambitious ATProtocol AppView service and sdks
0
fork

Configure Feed

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

fix prod font handling

+5 -1
+5 -1
frontend/src/features/landing/handlers.tsx
··· 35 35 async function handleLandingOGImage(req: Request): Promise<Response> { 36 36 try { 37 37 // Set up fonts for Takumi 38 - const fontBuffer = await Deno.readFile("./src/fonts/InterVariable.ttf"); 38 + // In production (Docker), the working directory is /app, so fonts are at /app/frontend/src/fonts 39 + // In development, we're already in the frontend directory, so fonts are at ./src/fonts 40 + const isDevelopment = Deno.env.get("DENO_ENV") !== "production"; 41 + const fontPath = isDevelopment ? "./src/fonts/InterVariable.ttf" : "./frontend/src/fonts/InterVariable.ttf"; 42 + const fontBuffer = await Deno.readFile(fontPath); 39 43 40 44 const fonts = [ 41 45 {