Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions public/brief-requested.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<body>
<div class="wrap">
<nav>
<a class="logo" href="index.html">Tiny<span>Studio</span></a>
<a class="logo" href="/">Tiny<span>Studio</span></a>
<div class="navlinks">
<a href="audit.html">The appraisal</a>
<a href="agents.html">The desk</a>
<a href="pricing.html">Pricing</a>
<a href="/audit">The appraisal</a>
<a href="/agents">The desk</a>
<a href="/pricing">Pricing</a>
</div>
</nav>

Expand All @@ -51,7 +51,7 @@ <h1>That's it. <em>Nothing else needed from you.</em></h1>
</div>
</div>

<a class="back" href="index.html">Back to the site</a>
<a class="back" href="/">Back to the site</a>
</div>

<footer>
Expand Down
15 changes: 9 additions & 6 deletions scripts/check-site.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1457,17 +1457,20 @@ for (const [pageName, pageHtml, pageUrl] of structuredDataPages) {
// point at the final destination URL: the dogfood run reported every .html
// navigation target on home ("index.html" -> "/", "audit.html" -> "/audit",
// "agents.html" -> "/agents", "pricing.html" -> "/pricing", "specimen.html" ->
// "/specimen") as a redirecting internal link. The five public pages must
// therefore point every page link at the clean URL the worker serves, never
// at a .html file that resolves to it. These are STATIC SOURCE GUARDS (regex
// over the served files): CI has no browser, so they assert the .html target
// shape cannot return, not that the redirects are absent on the network.
// "/specimen") as a redirecting internal link. The five public pages (and the
// /brief-requested post-signup page, which carries the same logo/nav/back
// shell) must therefore point every page link at the clean URL the worker
// serves, never at a .html file that resolves to it. These are STATIC SOURCE
// GUARDS (regex over the served files): CI has no browser, so they assert the
// .html target shape cannot return, not that the redirects are absent on the
// network.
const internalLinkPages = [
["homepage", siteHome],
["audit page", siteAudit],
["desk page", read("public/agents.html")],
["pricing page", read("public/pricing.html")],
["specimen page", read("public/specimen.html")]
["specimen page", read("public/specimen.html")],
["brief-requested page", read("public/brief-requested.html")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize root-relative HTML targets in the added guard

When a brief-requested link is written in the common root-relative form href="/audit.html", target remains /audit.html, which is not a key in htmlPageTargets; the checker therefore passes even though the link still hits the redirecting .html endpoint. I confirmed this by substituting /audit.html on the newly guarded page and running node scripts/check-site.mjs, which exited successfully, so the detector added here does not reliably prevent the regression it is intended to cover.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the confirmation route in redirect targets

When any guarded page contains href="brief-requested.html", adding this page to internalLinkPages still does not report the redirecting link because htmlPageTargets has no brief-requested.html entry. I verified this by replacing one of this page's clean links with that value and running node scripts/check-site.mjs, which still passed; add the confirmation route mapping so the guard covers the .html twin of every included public page.

Useful? React with 👍 / 👎.

];

const htmlPageTargets = {
Expand Down
Loading