Configure OpenGraph and Twitter Card metadata for optimal link previews across social platforms.
Problem
When links are shared on Twitter, LinkedIn, Slack, Discord, etc., no custom preview appears—no featured image, generic description, platform defaults to scraping whatever it finds.
Entry Points
Two distinct scenarios require metadata:
Main Site (index.qmd, about.qmd) — site-level branding when sharing homepage
Individual Posts (posts/*/index.qmd) — post-specific title, description, featured image
Solution
Quarto has built-in OpenGraph support. We configure it at site level in _quarto.yml and override per-post via frontmatter.
Files to add: - [ ] images/site-preview.png — default social preview image
Phase 2: Site-Level Configuration
Update _quarto.yml to enable OpenGraph and Twitter Cards:
website:title:"linear content"description:"thoughts on language, numeric computations, and other things."site-url: https://linearcontent.com # Social sharingopen-graph:truetwitter-card:true # Default image for pages without specific imageimage: images/site-preview.png
Social Media Sharing Configuration
Configure OpenGraph and Twitter Card metadata for optimal link previews across social platforms.
Problem
When links are shared on Twitter, LinkedIn, Slack, Discord, etc., no custom preview appears—no featured image, generic description, platform defaults to scraping whatever it finds.
Entry Points
Two distinct scenarios require metadata:
index.qmd,about.qmd) — site-level branding when sharing homepageposts/*/index.qmd) — post-specific title, description, featured imageSolution
Quarto has built-in OpenGraph support. We configure it at site level in
_quarto.ymland override per-post via frontmatter.Architecture
Generated Output
Quarto auto-generates these meta tags when configured:
Implementation
Phase 1: Create Default Site Image
Create fallback image first so the config doesn’t reference a missing file.
Specs: - Size: 1200×630px (optimal for Twitter/LinkedIn/Facebook) - Format: PNG or JPG - Content: Simple branding (site name, tagline, monospace aesthetic)
Files to add: - [ ]
images/site-preview.png— default social preview imagePhase 2: Site-Level Configuration
Update
_quarto.ymlto enable OpenGraph and Twitter Cards:Files to modify: - [ ]
_quarto.yml— addsite-url,open-graph,twitter-card,imageVerification:
Phase 3: Post-Level Images
Add
image:field to post frontmatter pointing to a featured image.Example for existing post:
Image generation options: 1. Screenshot of the viz at interesting state 2. Auto-generated from post title/description 3. Custom designed per-post
Files to modify: - [ ]
posts/20260103_llm-resampling/index.qmd— addimage:field - [ ] Future posts — includeimage:in template/workflowFile Changes Summary
images/site-preview.png_quarto.ymlsite-url,open-graph,twitter-card,imageposts/*/index.qmdimage: preview.pngto frontmatterMinimal
_quarto.ymlDiffTesting
After implementation:
Build and check meta tags:
Validate with online tools:
Expected result:
Image Generation (Deferred)
Images can be created later. Options:
Recommend starting with manual screenshots of viz posts at interesting states—quick, authentic, low effort.
Checklist