Add dynamic OG image generation for rich iMessage/social previews

Generates a branded 1200x630 PNG per event with title, date/time/location
using Go's image package and a custom bitmap font. Supports BBQ_BASE_URL
env var for absolute URLs required by link preview crawlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-16 15:50:24 -04:00
parent ef3aa3e9c3
commit 6a70135a5d
4 changed files with 241 additions and 5 deletions
+2
View File
@@ -124,6 +124,7 @@ type EventPageData struct {
Rsvps []db.Rsvp
TotalGoing int64
IsAdmin bool
BaseURL string
}
func (s *Server) loadEventPage(r *http.Request, slug string, isAdmin bool) (*EventPageData, error) {
@@ -181,6 +182,7 @@ func (s *Server) loadEventPage(r *http.Request, slug string, isAdmin bool) (*Eve
Rsvps: rsvps,
TotalGoing: totalGoing,
IsAdmin: isAdmin,
BaseURL: s.baseURL,
}, nil
}