SvelteKit
Install the plugin:
npm install @aeorank/sveltekitConfiguration
Section titled “Configuration”Create an AEO config file:
import type { AeorankSvelteKitConfig } from "@aeorank/sveltekit";
export const aeoConfig: AeorankSvelteKitConfig = { siteName: "My Site", siteUrl: "https://example.com", description: "A description of your site for AI crawlers.", organization: { name: "My Company", }, faq: [ { question: "What does your product do?", answer: "It helps you..." }, ],};Server Routes
Section titled “Server Routes”Create server endpoints for each AEO file:
import { createAeoHandler } from "@aeorank/sveltekit";import { aeoConfig } from "$lib/aeo.config";
export const GET = createAeoHandler("llms.txt", aeoConfig);import { createAeoHandler } from "@aeorank/sveltekit";import { aeoConfig } from "$lib/aeo.config";
export const GET = createAeoHandler("llms-full.txt", aeoConfig);Repeat for all 8 files:
src/routes/CLAUDE.md/+server.tssrc/routes/schema.json/+server.tssrc/routes/robots-patch.txt/+server.tssrc/routes/faq-blocks.html/+server.tssrc/routes/citation-anchors.html/+server.tssrc/routes/sitemap-ai.xml/+server.ts
Static Generation
Section titled “Static Generation”Alternatively, generate files into static/ at build time:
import { generateAeoFiles } from "@aeorank/sveltekit";import { aeoConfig } from "../src/lib/aeo.config";
generateAeoFiles({ ...aeoConfig, outputDir: "static" });Generated Files
Section titled “Generated Files”All 8 AEO files are served at your site root: /llms.txt, /llms-full.txt, /CLAUDE.md, /schema.json, /robots-patch.txt, /faq-blocks.html, /citation-anchors.html, /sitemap-ai.xml.