Skip to content

Commit 5c48d47

Browse files
committed
more
1 parent 0fb911c commit 5c48d47

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { error } from '@sveltejs/kit';
2+
import svelte from '../../../../llms-small.txt/content-sveltekit.md?raw';
3+
import sveltekit from '../../../../llms-small.txt/content-sveltekit.md?raw';
4+
5+
export const prerender = true;
6+
7+
export function entries() {
8+
return [
9+
{ topic: 'svelte', path: '' },
10+
{ topic: 'sveltekit', path: '' }
11+
];
12+
}
13+
14+
export function GET({ params }) {
15+
if ((params.topic !== 'svelte' && params.topic !== 'sveltekit') || params.path) {
16+
error(404, 'Not Found');
17+
}
18+
19+
const content = params.topic === 'sveltekit' ? sveltekit : svelte;
20+
21+
return new Response(content, {
22+
status: 200,
23+
headers: {
24+
'Content-Type': 'text/plain; charset=utf-8',
25+
'Cache-Control': 'public, max-age=3600'
26+
}
27+
});
28+
}

apps/svelte.dev/src/routes/docs/llms/+page.svelte

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@
3232
<p>...and package-level documentation:</p>
3333

3434
<ul>
35-
<li><a href="/docs/svelte/llms.txt">/docs/svelte/llms.txt</a></li>
36-
<li><a href="/docs/kit/llms.txt">/docs/kit/llms.txt</a></li>
35+
<li>
36+
<a href="/docs/svelte/llms.txt">/docs/svelte/llms.txt</a> /
37+
<a href="/docs/svelte/llms.txt">/docs/svelte/llms-small.txt</a>
38+
</li>
39+
<li>
40+
<a href="/docs/kit/llms.txt">/docs/kit/llms.txt</a> /
41+
<a href="/docs/kit/llms.txt">/docs/kit/llms-small.txt</a>
42+
</li>
3743
<li><a href="/docs/cli/llms.txt">/docs/cli/llms.txt</a></li>
3844
</ul>
3945
</Text>

apps/svelte.dev/src/routes/llms.txt/template.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
55
## Documentation Sets
66

7-
- [Abridged documentation](https://svelte.dev/llms-small.txt): A minimal version of the Svelte and SvelteKit documentation, with examples and non-essential content removed
7+
- [Abridged documentation](https://svelte.dev/llms-medium.txt): A shorter version of the Svelte and SvelteKit documentation, with examples and non-essential content removed
8+
- [Compressed documentation](https://svelte.dev/llms-small.txt): A minimal version of the Svelte and SvelteKit documentation, with many examples and non-essential content removed
89
- [Complete documentation](https://svelte.dev/llms-full.txt): The complete Svelte and SvelteKit documentation including all examples and additional content
910

1011
## Individual Package Documentation
@@ -13,7 +14,7 @@
1314

1415
## Notes
1516

16-
- The abridged documentation excludes legacy compatibility notes, detailed examples, and supplementary information
17+
- The abridged and compressed documentation excludes legacy compatibility notes, detailed examples, and supplementary information
1718
- The complete documentation includes all content from the official documentation
1819
- Package-specific documentation files contain only the content relevant to that package
1920
- The content is automatically generated from the same source as the official documentation

0 commit comments

Comments
 (0)