Skip to content

Veeeetzzzz/easy-ai-seo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

🧠 AI-SEO.js

AI-SEO.js is a lightweight, plug-and-play JavaScript utility that injects structured schema markup (JSON-LD) into any webpage. It's designed to make your content readable and indexable by AI-powered search engines (LLMs), like ChatGPT, Bing Chat, Google Gemini, and more — with just two lines of code.


🚀 Features

  • ✅ Zero dependencies
  • ✅ CDN-compatible (GitHub Pages or Vercel)
  • ✅ Schema.org-compliant (for FAQ pages)
  • ✅ Works with any JavaScript framework (React, Next.js, Vue, plain HTML)
  • ✅ Minimal integration (just 2 script tags)
  • ✅ Optimized for AI and SEO bots

📦 Installation

🔗 Option 1: GitHub CDN (Recommended)

Use directly via GitHub Pages:

<script src="https://github.com/Veeeetzzzz/easy-ai-seo/ai-seo.js"></script>

📁 Option 2: Host Locally

Download ai-seo.js and include it in your project:

<script src="/path/to/ai-seo.js"></script>

🛠️ Usage

After including the script, initialize it like this:

<script>
  AISEO.init({
    pageType: 'FAQPage',
    questionType: "How to optimize for AI search?",
    answerType: "Use structured data, clear headings, and conversational answers."
  });
</script>

That's it. One line to inject structured JSON-LD markup into your site.


🧩 Works With

  • ✅ Static HTML
  • ✅ React / Next.js
  • ✅ WordPress (paste into HTML block or template)
  • ✅ Shopify / Webflow
  • ✅ Any framework that supports JS

📄 Example Output (JSON-LD Injected)

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "How to optimize for AI search?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Use structured data, clear headings, and conversational answers."
      }
    }
  ]
}

✅ Validation

Use the following tools to confirm your schema is valid and indexable:


🧪 LLM Readability Test (Optional)

Want to check if AI models can read and understand your page?

Try this prompt in ChatGPT, Gemini, or Bing Chat:

“Can you summarize the content from [https://yourwebsite.com]? What question does it answer?”


🛡️ Best Practices

  • Host the JS file on a trusted domain (GitHub Pages or your own).
  • Use HTTPS to avoid mixed content issues.
  • Validate frequently when updating Q&A content.
  • Keep your schema up-to-date with SEO best practices.

🧰 Advanced (React/Next.js Example)

import { useEffect } from 'react';

const SEOPage = () => {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = "https://github.com/Veeeetzzzz/easy-ai-seo/ai-seo.js";
    script.onload = () => {
      AISEO.init({
        pageType: 'FAQPage',
        questionType: "What is AI SEO?",
        answerType: "It’s the practice of optimizing content for LLM-powered AI tools and search engines."
      });
    };
    document.head.appendChild(script);
  }, []);

  return <h1>My Optimized Page</h1>;
};

export default SEOPage;

📘 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.

About

Optimise your site for AI search engines with zero dependencies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors