Skip to content

Metadata and SEO

Titles, descriptions, Open Graph images, sitemaps, and per-page head control.

AI-generated · awaiting reviewUpdated View as Markdown

Nimbus handles the metadata baseline automatically and gives you per-page and site-wide control where you need it.

Titles and descriptions

title and description frontmatter populate <title> and <meta name="description">, and feed the search snippet and llms.txt indexes. Site-wide fallbacks come from the Nimbus config:

astro.config.tsts
nimbus({
  site: "https://docs.example.com",
  title: "Acme",
  description: "Build with Acme.",
});

Open Graph images

Set a site-wide fallback card and alt text, then override per page:

nimbus({
  /* … */
  socialImage: "/og.png",
  socialImageAlt: "Acme documentation",
});
---
title: Pricing
socialImage: /og/pricing.png
---

Nimbus also ships an OG image route, so pages without an explicit image get a generated card.

Image paths are logical paths without Astro’s deployment base. For a site deployed at /docs, keep socialImage: "/og.png"; Nimbus produces /docs/og.png. Absolute and protocol-relative image URLs are preserved.

Sitemap and robots

When site is set, the sitemap integration and /robots.txt are wired automatically. Disable the sitemap with sitemap: false in the integration options.

Per-page and site-wide head

Add elements to <head> site-wide via config.head, or per page via frontmatter — the two are merged:

---
title: Analytics-tracked page
head:
  - tag: meta
    attrs: { name: "robots", content: "noindex" }
  - tag: link
    attrs: { rel: "canonical", href: "https://example.com/canonical" }
---

Valid tags: meta, link, script, style, title, noscript, base. To exclude a page from crawlers without hand-writing the tag, use noindex: true.

Canonical URLs

On versioned sites, Nimbus emits <link rel="canonical"> pointing older versions at the current one, plus <link rel="alternate"> between siblings — driven by previousSlug.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close