From 317a6e07ac7780981d774ec89d50e7731d2e23fe Mon Sep 17 00:00:00 2001 From: orion-setkernel <341049454+orion-setkernel@users.noreply.github.com> Date: Sat, 21 Nov 2026 05:33:56 +0000 Subject: [PATCH] feat(live): add robots.txt and a canonical link (#99) Co-Authored-By: Claude Sonnet 5.5 --- public/index.html | 1 + public/robots.txt | 2 ++ test/page.test.mjs | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 public/robots.txt diff --git a/public/index.html b/public/index.html index 231ddec..240e4a7 100644 --- a/public/index.html +++ b/public/index.html @@ -5,6 +5,7 @@ setkernel live: four AI engineers at work + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/test/page.test.mjs b/test/page.test.mjs index 99b5e05..d4a1623 100644 --- a/test/page.test.mjs +++ b/test/page.test.mjs @@ -32,7 +32,9 @@ test("CSP allows scripts, styles and fonts only from the page itself", () => { test("index.html and style.css fetch nothing from another host", () => { const html = read("index.html"); + assert.match(html, //, "the main page names its canonical URL"); for (const m of html.matchAll(/<(link|script|img|iframe)\b[^>]*>/gi)) { + if (/rel="canonical"/.test(m[0])) continue; // names this page's URL; fetches nothing assert.doesNotMatch(m[0], /(src|href)\s*=\s*["']?(https?:)?\/\//i, m[0]); } const css = read("style.css");