GitHunt
VE

Veeeetzzzz/easy-ai-seo

Optimise your site for AI search engines with zero dependencies.

🧠 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

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.

Veeeetzzzz/easy-ai-seo | GitHunt