npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dudefactory/payload-plugin-seo-diagnostics

v3.0.0

Published

Payload CMS plugin for SEO content auditing and diagnostics

Downloads

192

Readme

@dudefactory/payload-plugin-seo-diagnostics

A Payload CMS plugin that provides SEO content auditing and diagnostics across your collections.

Features

  • 🔍 SEO Audit Dashboard - Review SEO titles, descriptions, and images across all localized collections
  • 🌍 Multi-locale Support - Check content quality across English, Spanish, and custom locales
  • Configurable Rules - Set custom character limits and validation rules
  • 🎯 Quick Navigation - Click to edit documents directly from the diagnostics view
  • 📊 Issue Summary - See how many documents need SEO improvements at a glance

Installation

pnpm add @dudefactory/payload-plugin-seo-diagnostics

Usage

Basic Setup

// payload.config.ts
import { seoDiagnosticsPlugin } from '@dudefactory/payload-plugin-seo-diagnostics';

export default buildConfig({
  plugins: [seoDiagnosticsPlugin()],
});

Custom Configuration

import { seoDiagnosticsPlugin } from '@dudefactory/payload-plugin-seo-diagnostics';

export default buildConfig({
  plugins: [
    seoDiagnosticsPlugin({
      // Audit these collections
      collections: [
        {
          slug: 'pages',
          label: 'Pages',
          docLabelPaths: ['title', 'slug'],
          metaPath: 'meta',
        },
        {
          slug: 'posts',
          label: 'Posts',
          docLabelPaths: ['title', 'slug'],
          metaPath: 'meta',
        },
      ],

      // SEO title character limit
      titleCharacterLimit: 60,

      // SEO description character range
      descriptionCharacterRange: {
        min: 100,
        max: 150,
      },

      // Custom locale validation rules
      localeValidationRules: [
        {
          localeCode: 'en',
          forbiddenCharacterPatterns: [
            { name: 'Spanish', pattern: '[áéíóúÁÉÍÓÚñÑüÜ¡¿]' },
          ],
        },
        {
          localeCode: 'es',
          forbiddenCharacterPatterns: [
            { name: 'English slang', pattern: 'ing\\b' },
          ],
        },
        {
          localeCode: 'fr',
          forbiddenCharacterPatterns: [
            { name: 'Accented non-French', pattern: '[ñ]' },
          ],
        },
      ],
    }),
  ],
});

Configuration Options

collections

Array of collections to audit for SEO issues.

  • Type: SeoDiagnosticsCollectionConfig[]
  • Default: ['pages', 'posts', 'services']

SeoDiagnosticsCollectionConfig

  • slug (string) - Collection slug
  • label (string) - Collection display name
  • docLabelPaths (string[], optional) - Paths to use for document labels (e.g., ['title', 'slug'])
  • metaPath (string, optional) - Path to SEO metadata (default: 'meta')

titleCharacterLimit

Maximum allowed characters for SEO titles.

  • Type: number
  • Default: 60

descriptionCharacterRange

Recommended character range for SEO descriptions.

  • Type: { min: number; max: number }
  • Default: { min: 100, max: 150 }

validateSpanishCharacters (Deprecated)

Enable Spanish character validation. Deprecated — use localeValidationRules instead.

  • Type: boolean
  • Default: true

localeValidationRules

Custom character validation rules per locale. Allows you to validate any character patterns for any locale combination.

  • Type: LocaleValidationRule[]
  • Default: Uses Spanish validation for English locales (if validateSpanishCharacters is true)

LocaleValidationRule

{
  // Locale code prefix to match (e.g., 'en' matches 'en-US', 'en-GB')
  localeCode: string;

  // Character patterns forbidden in this locale
  forbiddenCharacterPatterns?: LocaleCharacterPattern[];
}

LocaleCharacterPattern

{
  // Name of the character set
  name: string;

  // Regex pattern for forbidden characters
  pattern: string; // e.g., '[áéíóúÁÉÍÓÚñÑüÜ¡¿]'
}

Examples

Disable all character validation:

localeValidationRules: [];

Check English for Spanish and French characters:

localeValidationRules: [
  {
    localeCode: 'en',
    forbiddenCharacterPatterns: [
      { name: 'Spanish', pattern: '[áéíóúÁÉÍÓÚñÑüÜ¡¿]' },
      { name: 'French', pattern: '[àâäçèéêëîïôöùûüœæ]' },
    ],
  },
];

Check Spanish for non-Spanish characters:

localeValidationRules: [
  {
    localeCode: 'es',
    forbiddenCharacterPatterns: [
      { name: 'English slang endings', pattern: 'ing\\b' },
      { name: 'German umlauts', pattern: '[äöüß]' },
    ],
  },
];

Accessing the View

After installation, a SEO Diagnostics link appears in your Payload admin navigation. Click it to access the audit dashboard.

Path: /admin/seo-diagnostics

Issue Detection

The plugin automatically flags:

  • ✋ Missing SEO title or description
  • 📏 SEO title exceeds character limit
  • 📝 SEO description too short or too long
  • 🌐 Mismatched locale characters (e.g., Spanish characters in English content)

Monorepo Usage

If using this in a monorepo with local plugins:

{
  "dependencies": {
    "@dudefactory/payload-plugin-seo-diagnostics": "workspace:*"
  }
}

License

MIT