Open Graph and Twitter Card tags via document.head - serialized into static HTML at build time.
Open Graph and Twitter Card tags control how pages look when shared on Facebook, LinkedIn, Slack, and X. Add them to the document export's head node tree on the root layout or on any page. The tags are serialized into the static HTML at build time and appear in both development and production.
public/og-image.png (1200×630 recommended) and reference it from document.headdocument.head render in dev and are also injected into pre-rendered HTML by bini-ssg at build timeOpen Graph tags control previews on Facebook, LinkedIn, and Slack.
document.head is a full JSX node tree. It is serialized into the static HTML. Attribute values and children must be static — dynamic values are dropped with a BINI_R004 warning.public/og-image.png and reference it from document.head. Replace it with your own 1200×630 asset.| Tag | Example | Purpose |
|---|---|---|
| og:title | <meta property="og:title" content="..." /> | Card title |
| og:description | <meta property="og:description" content="..." /> | Card description |
| og:url | <meta property="og:url" content="https://..." /> | Canonical URL |
| og:type | <meta property="og:type" content="website" /> | Content type |
| og:image | <meta property="og:image" content="/og-image.png" /> | Preview image URL |
| og:image:width | <meta property="og:image:width" content="1200" /> | 1200 recommended |
| og:image:height | <meta property="og:image:height" content="630" /> | 630 recommended |
| og:image:alt | <meta property="og:image:alt" content="..." /> | Alt text |
| og:site_name | <meta property="og:site_name" content="My App" /> | Site name |
| og:locale | <meta property="og:locale" content="en_US" /> | Locale |
| Attribute | Recommended | Notes |
|---|---|---|
| og:image | — | Image URL |
| og:image:width | 1200 | Pixel width |
| og:image:height | 630 | Pixel height |
| og:image:alt | — | Alt text |
Twitter (X) cards control how links appear in the feed. The most common types are summary and summary_large_image. Add the meta tags to document.head in the page or root layout.
| Tag | Example | Purpose |
|---|---|---|
| twitter:card | <meta name="twitter:card" content="summary_large_image" /> | Card type |
| twitter:title | <meta name="twitter:title" content="..." /> | Card title |
| twitter:description | <meta name="twitter:description" content="..." /> | Card description |
| twitter:creator | <meta name="twitter:creator" content="@handle" /> | Author handle |
| twitter:image | <meta name="twitter:image" content="/og-image.png" /> | Preview image |
Card types
summary - small imagesummary_large_image - large image (recommended)app - mobile app cardplayer - video / audioThe document export is statically extracted by bini-router and stripped from the client bundle. In development, the dev server inlines the head node tree into the rendered page. During vite build, bini-ssg serializes the head tags into each pre-rendered HTML file.
| Tag | Applied in dev | Applied at build |
|---|---|---|
| document.head (title, meta, link, script) | Yes | Yes |
| document.html / document.body attributes | Yes | Yes |
document export (page first, then the closest layout) is used. Documents are not merged.BINI_R004 warning.dangerouslySetInnerHTML={{ __html: <static value> }} is supported for JSON-LD scripts.document are applied per route pattern (for example /blog/:slug), not per concrete URL. To vary tags per URL, render <title> / <meta> from the page component (the dev server hoists them into <head> when no document.head exists).Combined Open Graph and Twitter metadata for a blog post.
/blog/:slug, the injected tags use the route pattern. To vary tags per URL, render <title> / <meta> from the page component instead.Export document.head for site-wide head tags and page-level SEO.
Set icons and web manifests.
Create your first pages and wrap them in shared layouts.
Match URL segments with dynamic parameters and catch-alls.
Deploy to Node, Vercel, Netlify, Cloudflare, or Deno, or build native apps in CI.
Review CLI flags and system requirements.
Open Graph and Twitter Card tags via document.head - serialized into static HTML at build time.
Open Graph and Twitter Card tags control how pages look when shared on Facebook, LinkedIn, Slack, and X. Add them to the document export's head node tree on the root layout or on any page. The tags are serialized into the static HTML at build time and appear in both development and production.
public/og-image.png (1200×630 recommended) and reference it from document.headdocument.head render in dev and are also injected into pre-rendered HTML by bini-ssg at build timeOpen Graph tags control previews on Facebook, LinkedIn, and Slack.
document.head is a full JSX node tree. It is serialized into the static HTML. Attribute values and children must be static — dynamic values are dropped with a BINI_R004 warning.public/og-image.png and reference it from document.head. Replace it with your own 1200×630 asset.| Tag | Example | Purpose |
|---|---|---|
| og:title | <meta property="og:title" content="..." /> | Card title |
| og:description | <meta property="og:description" content="..." /> | Card description |
| og:url | <meta property="og:url" content="https://..." /> | Canonical URL |
| og:type | <meta property="og:type" content="website" /> | Content type |
| og:image | <meta property="og:image" content="/og-image.png" /> | Preview image URL |
| og:image:width | <meta property="og:image:width" content="1200" /> | 1200 recommended |
| og:image:height | <meta property="og:image:height" content="630" /> | 630 recommended |
| og:image:alt | <meta property="og:image:alt" content="..." /> | Alt text |
| og:site_name | <meta property="og:site_name" content="My App" /> | Site name |
| og:locale | <meta property="og:locale" content="en_US" /> | Locale |
| Attribute | Recommended | Notes |
|---|---|---|
| og:image | — | Image URL |
| og:image:width | 1200 | Pixel width |
| og:image:height | 630 | Pixel height |
| og:image:alt | — | Alt text |
Twitter (X) cards control how links appear in the feed. The most common types are summary and summary_large_image. Add the meta tags to document.head in the page or root layout.
| Tag | Example | Purpose |
|---|---|---|
| twitter:card | <meta name="twitter:card" content="summary_large_image" /> | Card type |
| twitter:title | <meta name="twitter:title" content="..." /> | Card title |
| twitter:description | <meta name="twitter:description" content="..." /> | Card description |
| twitter:creator | <meta name="twitter:creator" content="@handle" /> | Author handle |
| twitter:image | <meta name="twitter:image" content="/og-image.png" /> | Preview image |
Card types
summary - small imagesummary_large_image - large image (recommended)app - mobile app cardplayer - video / audioThe document export is statically extracted by bini-router and stripped from the client bundle. In development, the dev server inlines the head node tree into the rendered page. During vite build, bini-ssg serializes the head tags into each pre-rendered HTML file.
| Tag | Applied in dev | Applied at build |
|---|---|---|
| document.head (title, meta, link, script) | Yes | Yes |
| document.html / document.body attributes | Yes | Yes |
document export (page first, then the closest layout) is used. Documents are not merged.BINI_R004 warning.dangerouslySetInnerHTML={{ __html: <static value> }} is supported for JSON-LD scripts.document are applied per route pattern (for example /blog/:slug), not per concrete URL. To vary tags per URL, render <title> / <meta> from the page component (the dev server hoists them into <head> when no document.head exists).Combined Open Graph and Twitter metadata for a blog post.
/blog/:slug, the injected tags use the route pattern. To vary tags per URL, render <title> / <meta> from the page component instead.Export document.head for site-wide head tags and page-level SEO.
Set icons and web manifests.
Create your first pages and wrap them in shared layouts.
Match URL segments with dynamic parameters and catch-alls.
Deploy to Node, Vercel, Netlify, Cloudflare, or Deno, or build native apps in CI.
Review CLI flags and system requirements.