mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
docs(docs-site): update AI resource URLs and nav order
This commit is contained in:
parent
f1909b47c6
commit
e79caa8fb9
6 changed files with 26 additions and 22 deletions
|
|
@ -8,10 +8,10 @@ Use these instructions when a coding assistant needs to answer questions from th
|
|||
```text
|
||||
When answering KTX docs questions:
|
||||
|
||||
1. Start with https://ktx.dev/llms.txt.
|
||||
1. Start with https://docs.kaelio.com/ktx/llms.txt.
|
||||
2. Fetch the smallest relevant Markdown page from the index.
|
||||
3. Prefer /docs/<path>.md over rendered HTML.
|
||||
4. Use https://ktx.dev/llms-full.txt only when the task needs broad docs context.
|
||||
4. Use https://docs.kaelio.com/ktx/llms-full.txt only when the task needs broad docs context.
|
||||
5. Quote commands exactly from docs pages.
|
||||
6. If docs and local repository behavior disagree, say what differs and prefer local verified output for code changes.
|
||||
```
|
||||
|
|
@ -30,7 +30,7 @@ It does not describe local tool configuration.
|
|||
## Minimal project prompt
|
||||
|
||||
```text
|
||||
You are helping with KTX. Read https://ktx.dev/llms.txt first, then fetch only the Markdown pages needed for the task. Do not scrape the rendered docs site when a .md route exists.
|
||||
You are helping with KTX. Read https://docs.kaelio.com/ktx/llms.txt first, then fetch only the Markdown pages needed for the task. Do not scrape the rendered docs site when a .md route exists.
|
||||
```
|
||||
|
||||
## Repository prompt
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ Use this workflow when the user asks an assistant to answer a KTX docs question:
|
|||
## Docs lookup from a shell
|
||||
|
||||
```bash
|
||||
curl https://ktx.dev/llms.txt
|
||||
curl https://ktx.dev/docs/getting-started/quickstart.md
|
||||
curl https://docs.kaelio.com/ktx/llms.txt
|
||||
curl https://docs.kaelio.com/ktx/docs/getting-started/quickstart.md
|
||||
```
|
||||
|
||||
## Guardrails
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ KTX docs are available as plain Markdown so assistants do not need to parse the
|
|||
Fetch the curated index:
|
||||
|
||||
```text
|
||||
https://ktx.dev/llms.txt
|
||||
https://docs.kaelio.com/ktx/llms.txt
|
||||
```
|
||||
|
||||
Use this file to discover high-value pages, task-specific entry points, and Markdown URLs.
|
||||
|
|
@ -20,7 +20,7 @@ Use this file to discover high-value pages, task-specific entry points, and Mark
|
|||
Fetch the complete docs corpus:
|
||||
|
||||
```text
|
||||
https://ktx.dev/llms-full.txt
|
||||
https://docs.kaelio.com/ktx/llms-full.txt
|
||||
```
|
||||
|
||||
Use this when an assistant needs broad context across setup, concepts, CLI reference, integrations, and troubleshooting. Prefer the smaller per-page Markdown route for narrow tasks.
|
||||
|
|
@ -30,15 +30,15 @@ Use this when an assistant needs broad context across setup, concepts, CLI refer
|
|||
Every docs page has a Markdown route:
|
||||
|
||||
```text
|
||||
https://ktx.dev/docs/getting-started/quickstart.md
|
||||
https://ktx.dev/docs/cli-reference/ktx-agent.md
|
||||
https://ktx.dev/docs/guides/building-context.md
|
||||
https://docs.kaelio.com/ktx/docs/getting-started/quickstart.md
|
||||
https://docs.kaelio.com/ktx/docs/cli-reference/ktx-agent.md
|
||||
https://docs.kaelio.com/ktx/docs/guides/building-context.md
|
||||
```
|
||||
|
||||
Requests that ask for Markdown can also use the normal docs URL with `Accept: text/markdown`:
|
||||
|
||||
```bash
|
||||
curl -H "Accept: text/markdown" https://ktx.dev/docs/getting-started/quickstart
|
||||
curl -H "Accept: text/markdown" https://docs.kaelio.com/ktx/docs/getting-started/quickstart
|
||||
```
|
||||
|
||||
## Recommended retrieval order
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Use these prompts when asking a coding assistant to work with KTX. Replace proje
|
|||
## Learn the docs
|
||||
|
||||
```text
|
||||
Read https://ktx.dev/llms.txt first. Then fetch only the KTX Markdown pages needed for this task. Do not scrape rendered HTML unless no Markdown route exists.
|
||||
Read https://docs.kaelio.com/ktx/llms.txt first. Then fetch only the KTX Markdown pages needed for this task. Do not scrape rendered HTML unless no Markdown route exists.
|
||||
```
|
||||
|
||||
## Set up a project
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
"title": "KTX",
|
||||
"pages": [
|
||||
"getting-started",
|
||||
"ai-resources",
|
||||
"concepts",
|
||||
"guides",
|
||||
"integrations",
|
||||
"benchmarks",
|
||||
"cli-reference",
|
||||
"ai-resources",
|
||||
"community"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { source } from "@/lib/source";
|
||||
|
||||
const siteOrigin = "https://ktx.dev";
|
||||
const siteOrigin = "https://docs.kaelio.com/ktx";
|
||||
|
||||
export type LlmDocsPage = {
|
||||
title: string;
|
||||
|
|
@ -26,8 +26,8 @@ export async function getPageMarkdown(page: LlmDocsPage) {
|
|||
|
||||
return normalizeMarkdown(`# ${page.title}${description}
|
||||
|
||||
Canonical URL: ${page.url}
|
||||
Markdown URL: ${page.markdownUrl}
|
||||
Canonical URL: ${absoluteUrl(page.url)}
|
||||
Markdown URL: ${absoluteUrl(page.markdownUrl)}
|
||||
|
||||
${body}
|
||||
`);
|
||||
|
|
@ -40,7 +40,7 @@ export function buildLlmsTxt() {
|
|||
const page = byUrl.get(url);
|
||||
const description = page?.description ?? fallbackDescription;
|
||||
const markdownUrl = page?.markdownUrl ?? `${url}.md`;
|
||||
return `- [${label}](${markdownUrl}): ${description}`;
|
||||
return `- [${label}](${absoluteUrl(markdownUrl)}): ${description}`;
|
||||
};
|
||||
|
||||
return `# KTX
|
||||
|
|
@ -64,10 +64,10 @@ ${link("/docs/guides/writing-context", "Writing Context", "Write semantic source
|
|||
|
||||
## Machine-Readable Documentation
|
||||
|
||||
- [Full documentation](/llms-full.txt): All docs pages in one plain-text markdown response
|
||||
- [Markdown access guide](/docs/ai-resources/markdown-access.md): How to fetch llms.txt, llms-full.txt, and per-page Markdown
|
||||
- [Quickstart markdown](/docs/getting-started/quickstart.md): Human setup walkthrough
|
||||
- [Agent CLI markdown](/docs/cli-reference/ktx-agent.md): Machine-readable agent commands
|
||||
- [Full documentation](${absoluteUrl("/llms-full.txt")}): All docs pages in one plain-text markdown response
|
||||
- [Markdown access guide](${absoluteUrl("/docs/ai-resources/markdown-access.md")}): How to fetch llms.txt, llms-full.txt, and per-page Markdown
|
||||
- [Quickstart markdown](${absoluteUrl("/docs/getting-started/quickstart.md")}): Human setup walkthrough
|
||||
- [Agent CLI markdown](${absoluteUrl("/docs/cli-reference/ktx-agent.md")}): Machine-readable agent commands
|
||||
|
||||
## CLI Reference
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ function buildPageIndex(pages: LlmDocsPage[]) {
|
|||
const links = categoryPages
|
||||
.map((page) => {
|
||||
const description = page.description ? `: ${page.description}` : "";
|
||||
return `- [${page.title}](${page.markdownUrl})${description}`;
|
||||
return `- [${page.title}](${absoluteUrl(page.markdownUrl)})${description}`;
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
|
|
@ -138,6 +138,10 @@ ${links}`;
|
|||
.join("\n\n");
|
||||
}
|
||||
|
||||
function absoluteUrl(path: string) {
|
||||
return `${siteOrigin}${path}`;
|
||||
}
|
||||
|
||||
function formatCategoryName(category: string) {
|
||||
const labels: Record<string, string> = {
|
||||
"ai-resources": "AI Resources",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue