Skip to content
npm downloadsGitHub stars

Docusaurus

  1. Install the package:

    Terminal window
    npm install aeo.js
  2. Add the plugin to your docusaurus.config.js:

    docusaurus.config.js
    module.exports = {
    plugins: [
    ['aeo.js/docusaurus', { url: 'https://mysite.com', title: 'My Docs' }],
    ],
    };
  3. Build your site:

    Terminal window
    npm run build

The Docusaurus plugin uses two lifecycle hooks:

  • postBuild — after docusaurus build, it scans the generated HTML in the build output for titles, descriptions, and full text content, then writes all AEO files (robots.txt, llms.txt, sitemap.xml, ai-index.json, …) alongside the static output
  • injectHtmlTags — injects the AEO widget on every page

url, title, and description default to your Docusaurus siteConfig (url, title, tagline) when omitted, and baseUrl is folded into the generated URLs so project sub-path sites (e.g. https://user.github.io/project/) resolve correctly.

Explicit plugin options always override the values inferred from siteConfig:

plugins: [
[
'aeo.js/docusaurus',
{
url: 'https://mysite.com',
title: 'My Docs',
description: 'Documentation optimized for AI discovery',
schema: { organization: { name: 'My Company' } },
},
],
],

See the configuration reference for all available options.