Skip to content

Commit 7364727

Browse files
committed
site: expand llms.txt with downloads, version, and elevator pitch
1 parent 30655cc commit 7364727

1 file changed

Lines changed: 30 additions & 3 deletions

File tree

app/llms.txt/route.ts

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,42 @@
11
import { getAllPosts } from "@/lib/blog";
22
import { absoluteUrl, siteConfig } from "@/lib/site";
33

4-
export const dynamic = "force-static";
4+
export const revalidate = 300;
5+
6+
async function getStableVersion(): Promise<string | null> {
7+
try {
8+
const res = await fetch(siteConfig.stableManifestUrl, {
9+
next: { revalidate: 300 },
10+
});
11+
if (!res.ok) return null;
12+
const manifest = await res.json();
13+
return manifest.version ?? null;
14+
} catch {
15+
return null;
16+
}
17+
}
518

619
export async function GET() {
7-
const posts = await getAllPosts();
20+
const [posts, version] = await Promise.all([
21+
getAllPosts(),
22+
getStableVersion(),
23+
]);
24+
25+
const downloadsLine = version
26+
? `- [Latest releases](${siteConfig.links.releases}) for macOS, Windows, and Linux. Current stable: v${version}.`
27+
: `- [Latest releases](${siteConfig.links.releases}) for macOS, Windows, and Linux.`;
828

929
const lines = [
1030
`# ${siteConfig.name}`,
1131
"",
12-
`> ${siteConfig.description}`,
32+
"> Native interactive notebooks. Fast to launch, agent ready, humans welcome.",
33+
"",
34+
"nteract is a desktop notebook app for macOS, Windows, and Linux. Open a `.ipynb` file, a kernel starts, you're running code. No browser, no server to manage.",
35+
"",
36+
"## Downloads",
37+
"",
38+
downloadsLine,
39+
`- [Source on GitHub](${siteConfig.links.github})`,
1340
"",
1441
"## Blog",
1542
"",

0 commit comments

Comments
 (0)