fix(docs): preserve routes and navigation cache inputs

This commit is contained in:
morluto 2026-10-13 21:31:17 +08:00
parent ce3a418715
commit 2f1f944b6f
4 changed files with 9 additions and 4 deletions

View File

@ -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.

View File

@ -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);

View File

@ -31,7 +31,7 @@
"tsconfig.build.json",
"vitest.config.ts",
"scripts/**/*.d.mts",
"docs/.vitepress/config.ts"
"docs/.vitepress/**/*.ts"
],
"outputs": []
},

View File

@ -480,7 +480,7 @@ link.click();</code></pre>
<p>
For HTTP request and response bodies, use
<a
href="https://github.com/morluto/rea/blob/main/docs/web-network-captures.md"
href="https://github.com/morluto/rea/blob/main/docs/guides/web/web-network-captures.md"
>Fiddler Everywhere: SAZ captures, MCP and public skills</a
>. Export SAZ or HAR 1.2 for offline REA capture Evidence, or
connect Everywhere's MCP server to inspect captured traffic with