Skip to content

SvelteKit

Install the plugin:

Terminal window
npm install @aeorank/sveltekit

Create an AEO config file:

src/lib/aeo.config.ts
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..." },
],
};

Create server endpoints for each AEO file:

src/routes/llms.txt/+server.ts
import { createAeoHandler } from "@aeorank/sveltekit";
import { aeoConfig } from "$lib/aeo.config";
export const GET = createAeoHandler("llms.txt", aeoConfig);
src/routes/llms-full.txt/+server.ts
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.ts
  • src/routes/schema.json/+server.ts
  • src/routes/robots-patch.txt/+server.ts
  • src/routes/faq-blocks.html/+server.ts
  • src/routes/citation-anchors.html/+server.ts
  • src/routes/sitemap-ai.xml/+server.ts

Alternatively, generate files into static/ at build time:

scripts/generate-aeo.ts
import { generateAeoFiles } from "@aeorank/sveltekit";
import { aeoConfig } from "../src/lib/aeo.config";
generateAeoFiles({ ...aeoConfig, outputDir: "static" });

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.