---
title: "Metadata and SEO"
description: "Titles, descriptions, Open Graph images, sitemaps, and per-page head control."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.klounge.kr/llms.txt
> Use this file to discover all available pages before exploring further.

# Metadata and SEO

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:

```ts title="astro.config.ts"
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:

```ts
nimbus({
  /* … */
  socialImage: "/og.png",
  socialImageAlt: "Acme documentation",
});
```

```yaml
---
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:

```yaml
---
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`.

Source: https://docs.klounge.kr/ai/metadata-and-seo/index.mdx
