Add social preview metadata for posts #31
No reviewers
Labels
No labels
activitypub
actor
admin
ai-safety
article
articles
atproto
bug
cli
configuration
content
dev-environment
docker
enhancement
feature
federation
fediverse
forgejo
garage
health
how-to
logging
markdown
mastodon
media
navigation
opengraph
passkeys
preview
priority:medium
production
release
rendering
s3
settings
setup
status:active
status:done
status:inprogress
technical
webauthn
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit.com!31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task-2494df77-preview-metadata"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
og:url, and preview imagesVerification
og:title,og:description,og:url,og:type,og:image,twitter:card, andtwitter:imageforslug-cli-initTask: task-2494df77
Review summary
Approved. The PR adds social preview metadata for public pages and wires post detail pages to emit article-specific OpenGraph/Twitter metadata with absolute URLs and image-aware card selection.
Acceptance criteria
https://slugkit.com/posts/slug-cli-initemitsog:title,og:description,og:url,og:type, andog:image.preview: { type: "article", imageUrl: extractFirstImageUrl(post.content) }into the public layout.og:imagepoints to the article banner or another reachable absolute image URL.toAbsoluteUrl(...); local Chromium verification forslug-cli-initshowed an absolute banner URL.twitter:cardis present and usessummary_large_imagewhenog:imageexists.summary_large_imagewith preview images andsummarywhen no image is available.og:image/twitter:imageand no-image fallback behavior.Verification
npm run typechecknpm test -- --run src/routes/__tests__/public.test.tsnpm testnpm run buildog:title,og:description,og:url,og:type,og:image,twitter:card, andtwitter:imageforslug-cli-init.Blocking issues
None.
Warnings
None.
Verdict
Approved.