docs: add llms

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-02-09 21:46:09 +00:00
parent 40a3178b57
commit 9f441fd9fa
11 changed files with 330 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
export function middleware(request: NextRequest) {
const { pathname } = request.nextUrl;
if (pathname.endsWith('.md')) {
const url = request.nextUrl.clone();
url.pathname = '/md';
url.searchParams.set('path', pathname.slice(0, -3));
return NextResponse.rewrite(url);
}
return NextResponse.next();
}
export const config = {
matcher: ['/((?!_next|api|favicon|robots|sitemap|og).*\\.md)'],
};