Astro
-
Install the package:
Terminal window npm install aeo.js -
Add the integration to your Astro config:
astro.config.mjs import { defineConfig } from 'astro/config';import { aeoAstroIntegration } from 'aeo.js/astro';export default defineConfig({site: 'https://mysite.com',integrations: [aeoAstroIntegration({title: 'My Site',description: 'A site optimized for AI discovery',url: 'https://mysite.com',}),],}); -
Build your site:
Terminal window npm run build
How it works
Section titled “How it works”The Astro integration:
- Hooks into the Astro build pipeline via
astro:build:done - Scans all rendered HTML pages for content extraction
- Generates all AEO files in your output directory
- Automatically injects the Human/AI widget
- Persists the widget across View Transitions
Configuration
Section titled “Configuration”Pass any AeoConfig options to the integration:
aeoAstroIntegration({ title: 'My Site', url: 'https://mysite.com', generators: { robotsTxt: true, llmsTxt: true, sitemap: false, // Astro has its own sitemap }, widget: { position: 'bottom-left', theme: { accent: '#6366f1', }, },});