Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/components/AgentDirective.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,14 @@ const pageUrl = `${base}${Astro.url.pathname}`;
const productLlmsTxt = isProductPage
? `${base}/${productPrefix}/llms.txt`
: null;
const productLlmsFullTxt = isProductPage
? `${base}/${productPrefix}/llms-full.txt`
: null;
const globalLlmsTxt = `${base}/llms.txt`;
const globalLlmsFullTxt = `${base}/llms-full.txt`;

const directive = [
`STOP! If you are an AI agent or LLM, read this before continuing.`,
`This is the HTML version of a Cloudflare documentation page. Always request the Markdown version instead — HTML wastes context. Get this page as Markdown: ${pageMarkdownUrl} (append index.md) or send Accept: text/markdown to ${pageUrl}.`,
isProductPage
? `For this product's page index use ${productLlmsTxt}. For all Cloudflare products use ${globalLlmsTxt}.`
: `For all Cloudflare products use ${globalLlmsTxt}.`,
isProductPage
? `You can access all of this product's full docs in a single file at ${productLlmsFullTxt}, and all Cloudflare docs in a single file at ${globalLlmsFullTxt}.`
: `You can access all Cloudflare docs in single file at ${globalLlmsFullTxt}.`,
].join(" ");
---

Expand Down
2 changes: 0 additions & 2 deletions src/pages/[...product]/llms.txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ export const GET: APIRoute<Props> = async ({ props, url }) => {
> Links below point directly to Markdown versions of each page. Any page can also be retrieved as Markdown by sending an \`Accept: text/markdown\` header to the page's URL without the \`index.md\` suffix (for example, \`curl -H "Accept: text/markdown" ${base}${productUrl}\`).
>
> For other Cloudflare products, see the [Cloudflare documentation directory](${base}/llms.txt).
>
> Use [${title} llms-full.txt](${base}${productUrl}llms-full.txt) for the complete ${title} documentation in a single file, intended for offline indexing, bulk vectorization, or large-context models.

${pagesSection}
`);
Expand Down
2 changes: 0 additions & 2 deletions src/pages/llms.txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ export const GET: APIRoute = async ({ url }) => {
Explore guides and tutorials to start building on Cloudflare's platform.

> Each product below links to its own llms.txt, which contains a full index of that product's documentation pages and is the recommended way to explore a specific product's content.
>
> For the complete documentation archive in a single file, use the [Full Documentation Archive](${base}/llms-full.txt). That file is intended for offline indexing, bulk vectorization, or large-context models. Each product's llms.txt also links to a product-scoped llms-full.txt.

${grouped
.map(([group, entries]) => {
Expand Down