// llms.txt (https://llmstxt.org): a plain-text map of the site for AI assistants and AI search tools import { AUTHOR, SITE_DESCRIPTION, SITE_NAME, SITE_URL } from "@/lib/seo"; import { TRACKS } from "@/lib/tracks"; import { getPublishedTutorials } from "@/lib/tutorials"; export const dynamic = "force-static"; export function GET() { const tutorials = getPublishedTutorials(); const sections = TRACKS.map((track) => { const list = tutorials.filter((t) => t.track === track.slug); const lines = list.map((t) => `- [${t.title}](${SITE_URL}/${t.track}/${t.slug}): ${t.description}`); return [`## ${track.name}`, "", `${track.tagline}. [All ${track.name} tutorials](${SITE_URL}/${track.slug})`, "", ...lines].join("\n"); }); const text = [ `# ${SITE_NAME}`, "", `> ${SITE_DESCRIPTION}`, "", `Free, hands-on AI tutorials written by the ${AUTHOR.name} team (${SITE_URL}${AUTHOR.path}).`, "", "The Claude and Codex best-practice pages collect Anthropic's and OpenAI's own documentation, guides and videos, with credit and links to the originals.", "", ...sections.flatMap((section) => [section, ""]), "## Optional", "", `- [All tutorials](${SITE_URL}/tutorials): every tutorial, filterable by track and level`, `- [About](${SITE_URL}/about): what the site is`, `- [RSS feed](${SITE_URL}/feed.xml): new tutorials as they're published`, `- [Videos](${SITE_URL}/videos): the video tutorials`, "", ].join("\n"); return new Response(text, { headers: { "Content-Type": "text/plain; charset=utf-8" } }); }