Skip to content

Commit 29c10bf

Browse files
ensure robots.txt via test (#650)
* ensure robots.txt via test * Add test for llms.txt reference in robots.txt * Comment llms.txt reference to comply with robots.txt spec --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent e5b9509 commit 29c10bf

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ Host: https://docs.arcade.dev
77

88
# Sitemaps
99
Sitemap: https://docs.arcade.dev/sitemap.xml
10+
11+
# AI Agent Resources
12+
# https://docs.arcade.dev/llms.txt

tests/sitemap.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { readFileSync } from "node:fs";
2+
import { join } from "node:path";
13
import { expect, test } from "vitest";
24

35
test("sitemap lists expected URLs", async () => {
@@ -33,3 +35,19 @@ test("sitemap lists expected URLs", async () => {
3335
}
3436
}
3537
});
38+
39+
test("robots.txt references the sitemap", () => {
40+
const robotsPath = join(process.cwd(), "public", "robots.txt");
41+
const robotsContent = readFileSync(robotsPath, "utf-8");
42+
43+
expect(robotsContent).toContain(
44+
"Sitemap: https://docs.arcade.dev/sitemap.xml"
45+
);
46+
});
47+
48+
test("robots.txt references llms.txt", () => {
49+
const robotsPath = join(process.cwd(), "public", "robots.txt");
50+
const robotsContent = readFileSync(robotsPath, "utf-8");
51+
52+
expect(robotsContent).toContain("# https://docs.arcade.dev/llms.txt");
53+
});

0 commit comments

Comments
 (0)