Improve social media sharing and image optimization

Update meta tags in `index.html` for better Open Graph and Twitter Card compatibility, and update image URLs in `server/gallery-data.json`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1f7e7e89-a520-4970-9645-37daadc466dc
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: a2855efe-5aa8-492a-83ac-1f2ca8e1abca
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/1f7e7e89-a520-4970-9645-37daadc466dc/ZApZ5Qi
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic
2026-03-05 14:31:02 +00:00
parent 4031ac930a
commit fe68426515
6 changed files with 253 additions and 409 deletions
+9 -1
View File
@@ -74,6 +74,14 @@ export function serveStatic(app: Express) {
}
}
res.sendFile(indexPath);
const host = req.get("host") || "folx.tv";
const protocol = req.get("x-forwarded-proto") || "https";
const baseUrl = `${protocol}://${host}`;
let template = await fs.promises.readFile(indexPath, "utf-8");
template = template.replace(/https:\/\/www\.folx\.tv\//g, `${baseUrl}/`);
template = template.replace(/https:\/\/www\.folx\.tv\/og-image\.jpg/g, `${baseUrl}/og-image.jpg`);
res.status(200).set({ "Content-Type": "text/html" }).end(template);
});
}