@jhb.software/payload-seo-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

JHB Software - Payload SEO Plugin

NPM Version

Extends the official SEO plugin with additional features:

  • AI-powered meta description generation for compelling search results
  • Focus keyword tracking with intelligent warnings when keywords are missing from crucial elements (title, description, content)
  • Multi-keyword support with content usage analytics

Setup

Add the plugin to your payload config as follows:

 plugins: [
    payloadSeoPlugin({
      // ### Options which are passed to the official seo plugin ###
      collections: ['pages', 'projects'],

      // ### Options of this seo plugin ###
      websiteContext: {
        topic: 'A website of a software developer for mobile, web-apps and websites.',
      },
      documentContentTransformers: {
        pages: async (doc, lexicalToPlainText) => ({
          title: doc.title,
          body: (await lexicalToPlainText(doc.body)) ?? '',
        }),
        projects: async (doc, lexicalToPlainText) => ({
          title: doc.title,
          excerpt: doc.excerpt,
          tags: doc.tags?.join(', '),
          body: (await lexicalToPlainText(doc.body)) ?? '',
        }),
      },
    }),
  ],

Because this plugin extends the official SEO plugin, you can pass all config options of the official SEO plugin to this plugin.

Config options

For information about the config options of this plugin, see the SeoPluginConfig type.

Environment variables

The following environment variables are required:

  • OPENAI_API_KEY

Readme

Keywords

Package Sidebar

Install

npm i @jhb.software/payload-seo-plugin

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

38.5 kB

Total Files

55

Last publish

Collaborators

  • devj3ns
  • jhb-dev