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
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.
For information about the config options of this plugin, see the SeoPluginConfig type.
The following environment variables are required:
OPENAI_API_KEY