0Pricing
Sveltejs Academy · Lesson

OpenGraph and Twitter Card Meta

Add og: and twitter: meta tags for rich social media link previews.

Why OG Tags

Open Graph meta gives social platforms (Facebook, LinkedIn, Slack) rich previews when sharing links.

Required OG Tags

og:title, og:description, og:image, og:url are the most important.

<svelte:head>
  <meta property="og:title" content={title} />
  <meta property="og:description" content={description} />
  <meta property="og:image" content={imageUrl} />
  <meta property="og:url" content={url} />
</svelte:head>

All lessons in this course

  1. svelte:head for Dynamic Meta Tags
  2. OpenGraph and Twitter Card Meta
  3. JSON-LD Structured Data in SvelteKit
  4. Canonical URLs and Sitemap Generation
← Back to Sveltejs Academy