MetadataXGuides and Concepts
MetadataXGuides and Concepts
Smart defaults
Automatic title and description derivation.
Smart defaults fill in metadata when you omit fields.
Title derivation
titleFromPathderives from route segments.titleFromH1takes priority whencontext.h1is present.
Description derivation
descriptionFromContentuses 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,
},
});