Avenra
MetadataXGuides and Concepts
MetadataXGuides and Concepts

SEO linting

Development linting rules and overrides.

MetadataX runs development lint checks and can fail builds with the plugin.

Default rules

  • missing_canonical
  • missing_og_image
  • title_too_long (over 60 chars)
  • duplicate_title

Configure linting

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

export const seo = defineSeoConfig({
    lint: {
        strict: true,
        rules: {
            titleLength: 100,
            duplicate_title: "warn",
            missing_og_image: false,
        },
    },
});

Rule values

  • "warn" to force warning level
  • "error" to force error level
  • false to disable a rule

titleLength accepts a number or false to disable the length check.

On this page