From 0e548905c6a222a5f7f68751e223a04e97bac8dc Mon Sep 17 00:00:00 2001 From: JoshiCodes <55353244+JoshiCodes@users.noreply.github.com> Date: Tue, 10 Nov 2026 20:49:47 +0100 Subject: [PATCH] List templates in llms.txt and llms-full.txt llms.txt links the templates page and lists every template by category. llms-full.txt ends with a templates section: description, category, page and the components each one uses. --- src/routes/llms-full.txt/+server.ts | 19 +++++++++++++++++++ src/routes/llms.txt/+server.ts | 13 +++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/routes/llms-full.txt/+server.ts b/src/routes/llms-full.txt/+server.ts index b591067..fccd5f8 100644 --- a/src/routes/llms-full.txt/+server.ts +++ b/src/routes/llms-full.txt/+server.ts @@ -1,6 +1,7 @@ import { components, categoryOf } from '../components/catalog.js'; import { componentDocs, type PropDoc } from '../components/props.server.js'; import { site } from '../seo.js'; +import { categoryNames, templates } from '../templates/registry.js'; export const prerender = true; @@ -115,6 +116,24 @@ export function GET() { } } + parts.push( + '## Templates', + '', + 'Whole screens built from the components above. Each is a single Svelte file; the', + 'source is on its page.', + '' + ); + for (const template of templates) { + parts.push( + `### ${template.title}`, + '', + ...(template.description ? [template.description, ''] : []), + `Category: ${categoryNames[template.category]}. Page: ${site.url}/templates/${template.slug}`, + ...(template.uses.length ? ['', `Uses: ${template.uses.join(', ')}`] : []), + '' + ); + } + return new Response(parts.join('\n'), { headers: { 'content-type': 'text/plain; charset=utf-8' } }); diff --git a/src/routes/llms.txt/+server.ts b/src/routes/llms.txt/+server.ts index 45f5ce2..e69dc45 100644 --- a/src/routes/llms.txt/+server.ts +++ b/src/routes/llms.txt/+server.ts @@ -1,5 +1,6 @@ import { grouped } from '../components/catalog.js'; import { site } from '../seo.js'; +import { categories, templates } from '../templates/registry.js'; export const prerender = true; @@ -24,6 +25,7 @@ export function GET() { `- [How it compares](${site.url}/docs/comparison): next to shadcn-svelte, Bits UI and Skeleton, with measured bundle sizes`, `- [Component index](${site.url}/components): all components with examples and props`, `- [Theme generator](${site.url}/themes): generate a palette and copy the CSS`, + `- [Templates](${site.url}/templates): whole screens built from the kit, one Svelte file each`, `- [Full API as one file](${site.url}/llms-full.txt): every component, prop, default and keyboard shortcut` ]), ...grouped.map((group) => @@ -33,6 +35,17 @@ export function GET() { (item) => `- [${item.name}](${site.url}/components/${item.slug}): ${item.summary}` ) ) + ), + ...categories.map((category) => + section( + `Templates: ${category.name}`, + templates + .filter((template) => template.category === category.slug) + .map( + (template) => + `- [${template.title}](${site.url}/templates/${template.slug})${template.description ? `: ${template.description}` : ''}` + ) + ) ) ].join('\n');