Package Exports
- ai-seo
Readme
π§ AI-SEO (NPM Package)
AI-SEO is a plug-and-play JavaScript module for injecting Schema.org structured data (FAQPage format) into your pages, optimized for AI-based search engines like ChatGPT, Bing Chat, and Gemini.
π¦ Installation
npm install ai-seo
π οΈ Usage
import { initSEO } from 'ai-seo';
initSEO({
pageType: 'FAQPage',
questionType: "How do I use the ai-seo npm package?",
answerType: "Install the package with npm, import initSEO, and call it with your structured content."
});
React Example
import React, { useEffect } from 'react';
import { initSEO } from 'ai-seo';
const TestSEOPage = () => {
useEffect(() => {
initSEO({
pageType: 'FAQPage',
questionType: 'How do I use the ai-seo npm package?',
answerType: 'Install the package with npm, import initSEO, and call it with your structured content.'
});
}, []);
return (
<main>
<h1>Test Page for AI-SEO NPM Package</h1>
</main>
);
};
export default TestSEOPage;
π Comparison: AI-SEO vs Alternatives
Feature/Criteria | ai-seo | next-seo | directus-extension-seo |
---|---|---|---|
AI Content Generation | β No | β No | β Yes (ChatGPT-powered) |
Structured Data | β Yes (FAQPage Schema) | β οΈ Partial (via meta tags only) | β No (focuses on scoring/suggestions) |
SEO Meta Management | β No | β Yes | β οΈ Partial (within Directus CMS only) |
Platform/Framework | π Any JS frontend | π· Next.js only | π§± Directus CMS only |
Best Use Case | AI/FAQ search optimization | SEO best practices in Next.js | AI-powered SEO scoring/content optimization |
π€ Which Should You Choose?
ai-seo
:
Use if you want a lightweight, framework-agnostic way to injectFAQPage
schema for better AI and search engine visibility, especially for AI-driven search platforms.next-seo
:
Use if youβre building with Next.js and require comprehensive, declarative SEO meta management (but without AI features).directus-extension-seo
:
Use if youβre on Directus CMS and want AI-powered SEO scoring, validation, and ChatGPT-driven suggestions for content optimization.
β Features
- Compatible with any frontend project (React, Next.js, Vue, plain HTML)
- Tiny footprint
- Schema.org & SEO compliant
- AI-ready content structuring
π License
MIT License. Free for personal and commercial use.
π Support & Contributions
Feel free to fork, contribute, or submit issues/feature requests.
Created with β₯ to help the web evolve with AI-driven search.