Integration · SvelteKit

AHTML for SvelteKit — endpoints via Vite plugin

SvelteKit ships on Vite, so @ahtmljs/vite handles all four endpoints with no SvelteKit-specific install. Two server endpoints, same as any Svelte route.

Step 1 · Install
npm install @ahtmljs/vite @ahtmljs/schema
Step 2 · Wire it up
// vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import { ahtml } from '@ahtmljs/vite';

export default {
  plugins: [
    sveltekit(),
    ahtml({ manifest: ..., snapshot: ... }),
  ],
};
Step 3 · Verify

Deploy. Then:

curl https://your-site.com/.well-known/ahtml.json
curl https://your-site.com/ahtml
curl https://your-site.com/llms.txt
Notes for SvelteKit
  • Plays nicely with SvelteKit adapters (node, vercel, cloudflare, static).
  • Use +server.ts endpoints if you prefer route-handler style over the plugin.
  • See the Vite integration page for shared options.

Three files. Three minutes.

npm: @ahtmljs/viteGitHubScore your site