Fix Ghost API environment variables on server

cgen-4e996cf5c99e4a08a4ff44c958a776c0
This commit is contained in:
Builder.io 2025-11-15 20:22:52 +00:00
parent 4396e1cefc
commit 7d26b3d2b4

View file

@ -34,8 +34,8 @@ interface GhostApiResponse {
}
async function fetchFromGhost(limit: number = 50): Promise<any[]> {
const ghostUrl = process.env.VITE_GHOST_API_URL;
const ghostKey = process.env.VITE_GHOST_CONTENT_API_KEY;
const ghostUrl = process.env.GHOST_API_URL || process.env.VITE_GHOST_API_URL;
const ghostKey = process.env.GHOST_CONTENT_API_KEY || process.env.VITE_GHOST_CONTENT_API_KEY;
if (!ghostUrl || !ghostKey) {
return [];