Adding llms.txt, llms-full.txt and tdmrep.json to a Next.js App Router Site
A tutorial explains how developers can add machine-readable files that help AI coding assistants and AI search engines understand their sites within about ten minutes. It outlines the required structure of an llms.txt file under the llmstxt.org specification, including a single top-level heading, a short summary blockquote, and descriptive link lists. The piece also covers common robots.txt mistakes under RFC 9309, such as unintended prefix matches that can block or leak paths for AI crawlers. It demonstrates serving /llms.txt through a static Next.js App Router route handler with caching headers. The article additionally touches on serving a W3C tdmrep.json file and on tooling for converting existing documentation into these formats.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in