
By Szymon Wira
Premium, AI-powered Strapi plugin for generating highly optimized SEO metadata (Title, Description, Keywords, JSON-LD) using Google Gemini.
released March 7, 2026
npm install strapi-plugin-seo-geminiAn enterprise-grade Strapi 5 plugin that leverages Google's Gemini Flash AI models to automate SEO metadata generation. This project demonstrates high-quality software engineering practices, including strict TypeScript typing, deep Strapi admin integration, and optimized architectural patterns.
editView.right-links injection zone, providing a seamless sidebar workflow.any. Implements specific interfaces for Strapi application contexts, Koa request/response cycles, and AI data schemas.gemini-2.5-flash -> 2.0 -> 1.5) to ensure high availability and resistance to API rate-limiting or outages.title, body, category, tags, etc.) across diverse Strapi schemas. It gracefully falls back to a global field scan if specific matches are not found, ensuring functionality regardless of the Content-Type structure.useForm hook to programmatically populate form fields across various naming conventions (SEO, seo, Seo) using dynamic prefix detection.@strapi/design-system, featuring responsive layouts, consistent typography, and native Strapi styling (filterShadow).npm install strapi-plugin-seo-gemini
# or
yarn add strapi-plugin-seo-geminiAfter installation, rebuild the Strapi admin panel:
npm run build
npm run developThe plugin must be enabled in the Strapi configuration.
config/plugins.ts (or .js)Add the following configuration. If you already have other plugins, simply add strapi-plugin-seo-gemini to the object:
export default ({ env }) => ({
// ... other plugins
'strapi-plugin-seo-gemini': {
enabled: true,
config: {
apiKey: env('GEMINI_API_KEY'),
},
},
});.envAdd your Google Gemini API key to your environment variables:
GEMINI_API_KEY=your_api_key_hereThe plugin expects a component named SEO (or seo/Seo) with specific fields. Create a file at src/components/shared/seo.json:
{
"collectionName": "components_shared_seos",
"info": {
"displayName": "SEO",
"icon": "search",
"description": "SEO fields for articles and pages"
},
"options": {},
"attributes": {
"metaTitle": {
"type": "string",
"maxLength": 60
},
"metaDescription": {
"type": "text",
"maxLength": 160
},
"keywords": {
"type": "text"
},
"metaRobots": {
"type": "string",
"default": "index, follow"
},
"structuredData": {
"type": "json"
}
}
}In the Content-Type Builder, add the SEO component to your Content-Types. Use seo as the field name.
npm run build).GEMINI_API_KEY and field names.This plugin was built with a focus on maintainability and performance:
Developed as a demonstration of technical proficiency in Strapi Plugin Development and AI Integration.
If this plugin saved your time, please give it a ⭐ on GitHub! It helps me stay motivated to add more AI features.
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
