Skip to content

Add Open Graph and Twitter Card social preview metadata - #324

Open
astra-intelligence wants to merge 1 commit into
cs231n:masterfrom
astra-intelligence:og-social-preview
Open

astra-intelligence wants to merge 1 commit into
cs231n:masterfrom
astra-intelligence:og-social-preview

Conversation

@astra-intelligence

Copy link
Copy Markdown

This PR adds Open Graph and Twitter Card social preview metadata to CS231n, so course links stop rendering as blank cards when shared on Twitter/X, Slack, Discord, LinkedIn, or iMessage.

What's included:

  • Full Open Graph set in the shared _includes/head.html (type, site_name, title, description, url, image + image:type/width/height) — covers the homepage and every course-note page via the existing Liquid variables; per-page og:url/og:title resolve automatically.
  • Twitter Card summary_large_image + twitter:site (@cs231n) so shares show the preview card on X.
  • A 1200×630 og-image.png brand card (course name, topic pills, domain), generated by the included Pillow-only tools/make-og-image.py (byte-reproducible).

The image was generated with my own open OG Image Generator tooling. No tracking, no external requests — purely static meta tags.

The site has had a title and meta description but zero og:/twitter: tags,
so every share of any CS231n page renders as a blank link preview on
Twitter/X, Slack, Discord, LinkedIn and iMessage.

This adds a full Open Graph set (type, site_name, title, description, url,
image + image dimensions) and Twitter Card summary_large_image to the
shared head.html (covers the homepage and every course-note page via
existing Liquid vars), plus a 1200x630 og-image.png brand card generated
with Pillow.

This branch has not been deployed

No deployments
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.

1 participant