From 2f1f944b6f38d14560d438a1f508fc93fe280b8d Mon Sep 17 00:00:00 2001 From: morluto <17176810+morluto@users.noreply.github.com> Date: Tue, 13 Oct 2026 21:31:17 +0800 Subject: [PATCH] fix(docs): preserve routes and navigation cache inputs --- docs/development/documentation.md | 3 ++- scripts/verify-documentation-routes.mjs | 6 +++++- turbo.json | 2 +- website/public/guides/browser/index.html | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/development/documentation.md b/docs/development/documentation.md index e8f27c120..fc45ecb4d 100644 --- a/docs/development/documentation.md +++ b/docs/development/documentation.md @@ -76,6 +76,7 @@ because scripts, package consumers and release history depend on them. Change canonical sources and regenerate; do not fix a generated projection by hand. Run `npm run docs:check` for documentation facts and generated consistency, and -`npm run docs:build` for the complete production site and dead-link validation. +`npm run verify:docs:routes` to build the complete production site and check local +links, anchors and physical edit targets. When a physical path moves, also run the tests that read it. Follow [development checks](testing.md#developer-commands) before requesting review. diff --git a/scripts/verify-documentation-routes.mjs b/scripts/verify-documentation-routes.mjs index d0a9235fb..842d87ddc 100644 --- a/scripts/verify-documentation-routes.mjs +++ b/scripts/verify-documentation-routes.mjs @@ -71,7 +71,11 @@ for (const page of htmlPages.sort()) { )) { const destination = match[1].replaceAll("&", "&"); const url = new URL(destination, origin + "/rea/" + route); - if (url.origin !== origin || !url.pathname.startsWith("/rea/")) continue; + if (url.origin !== origin) continue; + assert.ok( + url.pathname.startsWith("/rea/"), + route + ": local link escaped site base " + destination, + ); const key = url.pathname + url.hash; if (checked.has(key)) continue; checked.add(key); diff --git a/turbo.json b/turbo.json index 758f31e32..238eb0171 100644 --- a/turbo.json +++ b/turbo.json @@ -31,7 +31,7 @@ "tsconfig.build.json", "vitest.config.ts", "scripts/**/*.d.mts", - "docs/.vitepress/config.ts" + "docs/.vitepress/**/*.ts" ], "outputs": [] }, diff --git a/website/public/guides/browser/index.html b/website/public/guides/browser/index.html index 60185ddb6..404b72c54 100644 --- a/website/public/guides/browser/index.html +++ b/website/public/guides/browser/index.html @@ -480,7 +480,7 @@ link.click();
For HTTP request and response bodies, use Fiddler Everywhere: SAZ captures, MCP and public skills. Export SAZ or HAR 1.2 for offline REA capture Evidence, or connect Everywhere's MCP server to inspect captured traffic with