Avenra
MetadataXGuides and Concepts
MetadataXGuides and Concepts

Smart defaults

Automatic title and description derivation.

Smart defaults fill in metadata when you omit fields.

Title derivation

  • titleFromPath derives from route segments.
  • titleFromH1 takes priority when context.h1 is present.

Description derivation

  • descriptionFromContent uses content text and truncates to 160 chars.
  • If content is missing, it falls back to "<Title> page".

Example

import { defineSeoConfig } from "@avenra/metadatax";

export const seo = defineSeoConfig({
    auto: {
        titleFromPath: true,
        titleFromH1: true,
        descriptionFromContent: true,
    },
});

On this page