Skip to content

Commit 1dd450b

Browse files
committed
llms-full.txt per product
1 parent 4a6fc9c commit 1dd450b

File tree

7 files changed

+23012
-17
lines changed

7 files changed

+23012
-17
lines changed

src/components/RightSidebar/MoreMenu.astro

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
---
22
import * as CONFIG from "../../config"
3+
34
const { editHref } = Astro.props
45
const pathname = Astro.url.pathname
56
const section = pathname.split("/").filter(Boolean)[0]
67
const llmsHref = `/${section}/llms-full.txt`
78
const showMoreSection = CONFIG.COMMUNITY_INVITE_URL || editHref
9+
10+
// ✅ Only show for specific products
11+
const supportedSections = ["vrf", "ccip", "data-feeds", "data-streams", "chainlink-functions", "chainlink-automation"]
12+
const llmsExists = supportedSections.includes(section)
813
---
914

1015
{showMoreSection && <h2 class="heading">More</h2>}
1116
<ul>
12-
<li class="header-link">
13-
<a href={llmsHref} target="_blank" class="llms-link">
14-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
15-
<path
16-
fill-rule="evenodd"
17-
clip-rule="evenodd"
18-
d="M12.06 2.06L13 0L13.94 2.06L16 3L13.94 3.94L13 6L12.06 3.94L10 3L12.06 2.06ZM4.47 7.47L6.5 3L8.53 7.47L13 9.5L8.53 11.53L6.5 16L4.47 11.53L0 9.5L4.47 7.47Z"
19-
fill="#0847F7"></path>
20-
</svg>
21-
<p>View as plain text for LLMs</p>
22-
</a>
23-
<svg width="34" height="18" viewBox="0 0 34 18" fill="none" xmlns="http://www.w3.org/2000/svg">
24-
<path
25-
d="M25 0C29.9706 2.57702e-07 34 4.02944 34 9C34 13.9706 29.9706 18 25 18H9C4.02944 18 0 13.9706 0 9C0 4.02944 4.02944 2.57702e-07 9 0H25ZM7 6V11.8184H7.87793V7.55078H7.93164L10.8896 11.8184H11.6963V6H10.8271V10.2725H10.7725L7.8125 6H7ZM14.0771 6V11.8184H17.7588V11.0625H14.9541V9.28125H17.5342V8.52832H14.9541V6.75586H17.7246V6H14.0771ZM19.5225 6L21.1357 11.8184H22.0225L23.2471 7.45996H23.292L24.5166 11.8184H25.4004L27.0166 6H26.0908L24.96 10.5088H24.9062L23.7266 6H22.8125L21.6328 10.5059H21.5791L20.4453 6H19.5225Z"
26-
fill="#0847F7"></path>
27-
</svg>
28-
</li>
17+
{
18+
llmsExists && (
19+
<li class="header-link">
20+
<a href={llmsHref} target="_blank" class="llms-link">
21+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
22+
<path
23+
fill-rule="evenodd"
24+
clip-rule="evenodd"
25+
d="M12.06 2.06L13 0L13.94 2.06L16 3L13.94 3.94L13 6L12.06 3.94L10 3L12.06 2.06ZM4.47 7.47L6.5 3L8.53 7.47L13 9.5L8.53 11.53L6.5 16L4.47 11.53L0 9.5L4.47 7.47Z"
26+
fill="#0847F7"
27+
/>
28+
</svg>
29+
<p>View as plain text for LLMs</p>
30+
</a>
31+
<svg width="34" height="18" viewBox="0 0 34 18" fill="none" xmlns="http://www.w3.org/2000/svg">
32+
<path
33+
d="M25 0C29.9706 2.57702e-07 34 4.02944 34 9C34 13.9706 29.9706 18 25 18H9C4.02944 18 0 13.9706 0 9C0 4.02944 4.02944 2.57702e-07 9 0H25ZM7 6V11.8184H7.87793V7.55078H7.93164L10.8896 11.8184H11.6963V6H10.8271V10.2725H10.7725L7.8125 6H7ZM14.0771 6V11.8184H17.7588V11.0625H14.9541V9.28125H17.5342V8.52832H14.9541V6.75586H17.7246V6H14.0771ZM19.5225 6L21.1357 11.8184H22.0225L23.2471 7.45996H23.292L24.5166 11.8184H25.4004L27.0166 6H26.0908L24.96 10.5088H24.9062L23.7266 6H22.8125L21.6328 10.5059H21.5791L20.4453 6H19.5225Z"
34+
fill="#0847F7"
35+
/>
36+
</svg>
37+
</li>
38+
)
39+
}
2940
{
3041
editHref && (
3142
<li class="header-link">

src/content/ccip/llms-full.txt

Lines changed: 10518 additions & 0 deletions
Large diffs are not rendered by default.

src/content/chainlink-automation/llms-full.txt

Lines changed: 4290 additions & 0 deletions
Large diffs are not rendered by default.

src/content/vrf/llms-full.txt

Lines changed: 8119 additions & 0 deletions
Large diffs are not rendered by default.

src/pages/ccip/llms-full.txt.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fs from "fs/promises"
2+
import path from "path"
3+
import type { APIRoute } from "astro"
4+
5+
export const GET: APIRoute = async () => {
6+
const filePath = path.resolve("src/content/ccip/llms-full.txt")
7+
8+
try {
9+
const fileContents = await fs.readFile(filePath, "utf-8")
10+
return new Response(fileContents, {
11+
status: 200,
12+
headers: {
13+
"Content-Type": "text/plain",
14+
},
15+
})
16+
} catch (error) {
17+
return new Response("File not found.", { status: 404 })
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fs from "fs/promises"
2+
import path from "path"
3+
import type { APIRoute } from "astro"
4+
5+
export const GET: APIRoute = async () => {
6+
const filePath = path.resolve("src/content/chainlink-automation/llms-full.txt")
7+
8+
try {
9+
const fileContents = await fs.readFile(filePath, "utf-8")
10+
return new Response(fileContents, {
11+
status: 200,
12+
headers: {
13+
"Content-Type": "text/plain",
14+
},
15+
})
16+
} catch (error) {
17+
return new Response("File not found.", { status: 404 })
18+
}
19+
}

src/pages/vrf/llms-full.txt.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import fs from "fs/promises"
2+
import path from "path"
3+
import type { APIRoute } from "astro"
4+
5+
export const GET: APIRoute = async () => {
6+
const filePath = path.resolve("src/content/vrf/llms-full.txt")
7+
8+
try {
9+
const fileContents = await fs.readFile(filePath, "utf-8")
10+
return new Response(fileContents, {
11+
status: 200,
12+
headers: {
13+
"Content-Type": "text/plain",
14+
},
15+
})
16+
} catch (error) {
17+
return new Response("File not found.", { status: 404 })
18+
}
19+
}

0 commit comments

Comments
 (0)