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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user