Rich Social Previews with JSON-LD
· seo hugo
Rich Social Previews with JSON-LD
Sharing a link should look good. This post covers the metadata that makes it happen.
Open Graph and Twitter cards
Every page emits og:* and twitter:* tags. The social image falls back to a
site-wide default when a post doesn’t specify its own, and all image URLs are
absolute so platforms can fetch them.
JSON-LD
Structured data is built as a map and serialized once, guaranteeing valid JSON.
Articles emit BlogPosting, the profile emits ProfilePage, and list pages like
the blog index emit a CollectionPage with an ItemList of posts.
Result
Links now render with a title, description, and image across social platforms, and search engines get clean, valid structured data.
A bit of math
Inline math like $E = mc^2$ renders alongside text, and display math stands on its own:
$$\int_{-\infty}^{\infty} e^{-x^2},dx = \sqrt{\pi}$$