From 9db697f23e568a0eb0efe61ebf8cdcdcc6b3c68b Mon Sep 17 00:00:00 2001
From: Troy Karraker <48978134+TeeKraken@users.noreply.github.com>
Date: Thu, 19 Nov 2026 22:46:40 -0800
Subject: [PATCH 1/2] Search basics: robots.txt, sitemap.xml, canonical link,
IndexNow key
---
index.html | 1 +
public/af56e4ffb79cf9d9140d41bb3d3075fe.txt | 1 +
public/robots.txt | 4 ++++
public/sitemap.xml | 4 ++++
4 files changed, 10 insertions(+)
create mode 100644 public/af56e4ffb79cf9d9140d41bb3d3075fe.txt
create mode 100644 public/robots.txt
create mode 100644 public/sitemap.xml
diff --git a/index.html b/index.html
index c6c6f5a..421b57e 100644
--- a/index.html
+++ b/index.html
@@ -3,6 +3,7 @@
+
Scale Reader: read the numbers off a basic bathroom scale
diff --git a/public/af56e4ffb79cf9d9140d41bb3d3075fe.txt b/public/af56e4ffb79cf9d9140d41bb3d3075fe.txt
new file mode 100644
index 0000000..1033ad6
--- /dev/null
+++ b/public/af56e4ffb79cf9d9140d41bb3d3075fe.txt
@@ -0,0 +1 @@
+af56e4ffb79cf9d9140d41bb3d3075fe
\ No newline at end of file
diff --git a/public/robots.txt b/public/robots.txt
new file mode 100644
index 0000000..152aa82
--- /dev/null
+++ b/public/robots.txt
@@ -0,0 +1,4 @@
+User-agent: *
+Allow: /
+
+Sitemap: https://scale-reader.vercel.app/sitemap.xml
diff --git a/public/sitemap.xml b/public/sitemap.xml
new file mode 100644
index 0000000..ddca3fa
--- /dev/null
+++ b/public/sitemap.xml
@@ -0,0 +1,4 @@
+
+
+ https://scale-reader.vercel.app/
+
From 0beec49c2ba5017788a1aa65b74ff648ae9ac329 Mon Sep 17 00:00:00 2001
From: Troy Karraker <48978134+TeeKraken@users.noreply.github.com>
Date: Thu, 19 Nov 2026 23:18:56 -0800
Subject: [PATCH 2/2] Service worker: leave robots, sitemap and the IndexNow
key to the network (astra r1)
---
src/sw/worker.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/sw/worker.js b/src/sw/worker.js
index ea69565..623f050 100644
--- a/src/sw/worker.js
+++ b/src/sw/worker.js
@@ -71,6 +71,8 @@ export function registerWorker(scope, config) {
scope.addEventListener("fetch", (event) => {
const req = event.request;
if (req.method !== "GET" || new URL(req.url).origin !== scope.location.origin) return;
+ // Search-engine files (robots, sitemap, IndexNow key) always come from the network, never the app shell.
+ if (/^\/(robots\.txt|sitemap\.xml|[0-9a-f]{32}\.txt)$/.test(new URL(req.url).pathname)) return;
if (req.mode === "navigate") {
event.respondWith(handleNavigation(scope, cacheName, req));
return;