Skip to content

Commit bd4560f

Browse files
committed
feat: add Twitter/OG image support for public notes
1 parent 97c6c7b commit bd4560f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

worker/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function generateHTML(note: PublicNote, origin: string): string {
135135
// Extract first image from content, or use default OG image
136136
const contentImage = note.content ? extractFirstImage(note.content) : null;
137137
const ogImage = contentImage || `${origin}/og-image.png`;
138-
// Use summary_large_image if we have an image, otherwise summary
138+
// Use summary_large_image if note has an image, otherwise summary (square) for logo fallback
139139
const twitterCardType = contentImage ? 'summary_large_image' : 'summary';
140140

141141
// Process content: strip sensitive data attributes

worker/wrangler.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ compatibility_date = "2024-01-01"
44

55
[vars]
66
# Your backend API URL
7-
API_URL = "https://your-api-domain.com/api"
7+
API_URL = "https://api.typelets.com/api"
88
ENVIRONMENT = "production"
99

1010
# Routes - intercept /p/* paths

0 commit comments

Comments
 (0)