Skip to content

Conversation

@shigahi
Copy link
Collaborator

@shigahi shigahi commented Jan 22, 2026

Summary

Enhance Open Graph and Twitter Card meta tags for better link previews in Slack, Discord, LinkedIn, and other platforms.

Changes

  • Add SocialPreviewOptions interface with defaultImage, imageWidth, imageHeight, twitterCardType, locale
  • Add og:type, og:image:width, og:image:height, og:locale meta tags
  • Add twitter:card meta tag with configurable type
  • Support default OG image fallback for pages without specific images
  • Add "Social Preview" UI section in Advanced Settings

Implementation Details

New meta tags added:

  • og:type="website" - Standard type for websites
  • og:image:width / og:image:height - Image dimensions for better preview rendering
  • og:locale - Language targeting (e.g., "en_US", "ja_JP")
  • twitter:card - Configurable card type (summary or summary_large_image)

Default OG Image fallback:

  • If page-specific ogImage is not set, uses socialPreview.defaultImage as fallback

UI Changes

Added "Social Preview" section in Advanced Settings with:

  • Default OG Image URL input
  • Image Width/Height inputs
  • Twitter Card Type selector
  • Locale input

Benefits

  • Professional appearance in Slack/Discord/LinkedIn shares
  • Consistent branding across social platforms
  • Better click-through rates from social shares

Closes #34

- Add SocialPreviewOptions interface with defaultImage, imageWidth/Height, twitterCardType, locale
- Add og:type, og:image:width, og:image:height, og:locale meta tags
- Add twitter:card meta tag with configurable type
- Support default OG image fallback for pages without specific images
- Add Social Preview UI section with all configuration options

Closes #34
@shigahi shigahi merged commit c8f49ca into master Jan 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance Open Graph tags for better link previews

2 participants