Integration · Remix / React Router 7roadmap
AHTML for Remix — route resources today, native plugin v0.2
You can serve AHTML from Remix today using resource routes and @ahtmljs/agent. A native plugin that hooks into Remix loaders is on the v0.2 roadmap.
Step 1 · Install
npm install @ahtmljs/agent @ahtmljs/schemaStep 2 · Wire it up
// app/routes/ahtml.tsx
import { buildAhtmlResponse } from '@ahtmljs/agent';
import { ahtmlConfig } from '~/lib/ahtml-config';
import { buildSnapshot } from '~/lib/snapshots';
export async function loader({ request }: { request: Request }) {
return buildAhtmlResponse(request, ahtmlConfig, buildSnapshot);
}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.txtNotes for Remix / React Router 7
- Same approach works for React Router 7 (the merged Remix successor).
- Use a $.tsx splat if you need /ahtml/:type/:id paths.
- A first-class plugin is tracked in the v0.2 roadmap.