Skip to content

fix(docs): link between the two pages absolutely, like everything else - #21

Merged
fajarhide merged 1 commit into
mainfrom
fix/cross-host-guide-link
Jul 27, 2026
Merged

fajarhide merged 1 commit into
mainfrom
fix/cross-host-guide-link

Conversation

@fajarhide

Copy link
Copy Markdown
Contributor

The guide link shipped in #20 was relative, and it broke on the host it was written to support.

Next serves the proxied page as weekndlabs.com/design with no trailing slash, so the browser resolves ./guide/ against / and lands on weekndlabs.com/guide. Outside the docs, nothing rendered.

from href landed on guide rendered
weekndlabs.com/design ./guide/ weekndlabs.com/guide no
design.weekndlabs.com/ ./guide/ design.weekndlabs.com/guide/ yes

SiteChrome.astro already carries the rule and the reason:

Every link is absolute. The page answers on two hosts — design.weekndlabs.com and weekndlabs.com/design — and a relative href would point somewhere different depending on which one served it.

I wrote a comment in #20 arguing the opposite and shipped exactly the failure that comment predicts. Both links are now absolute to the canonical host, which is where the canonical URL already points.

Why the local check missed it

I tested both links against a local serve and they passed, because a local server has no /design prefix. Only the proxy adds it, so only the live site can show the bug. This was caught by driving the deployed site after merging, which is the check that should have run before.

The guide link shipped in #20 was relative and broke on the proxied host.
Next serves that page as weekndlabs.com/design with no trailing slash, so the
browser resolved `./guide/` against `/` and landed on weekndlabs.com/guide,
outside the docs. The page did not render. On the subdomain the same href
worked, which is why the local check passed.

SiteChrome.astro already states the rule and the reason: every link is
absolute because the page answers on two hosts and a relative href points
somewhere different depending on which one served it. These two links now
follow it.

Checked against the live site rather than a local build, since a local server
cannot reproduce a path prefix that only the proxy adds.
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design Ready Ready Preview, Comment Jul 27, 2026 5:18am

@fajarhide
fajarhide merged commit 278b94b into main Jul 27, 2026
3 checks passed
@fajarhide
fajarhide deleted the fix/cross-host-guide-link branch July 27, 2026 05:19
fajarhide added a commit that referenced this pull request Jul 27, 2026
…on (#22)

The two page links now target weekndlabs.com/design rather than the
subdomain, so a visitor stays on the main site. Still absolute, for the reason
#21 established: the page answers on two hosts and a relative href resolves
differently on each.

No trailing slash on the path. weekndlabs.com/design/guide/ answers 308 to the
version without it, so linking with one spends a redirect on every visitor.

The docs site had no favicon at all, so browsers drew their own. It now points
at weekndlabs.com's three icons rather than copying them in, the same way
SiteChrome.astro already loads the brand mark from there. icon.png has been
changed once before, and two copies drifting apart is the thing worth
avoiding. All four referenced URLs check out 200 with the right content type.

Note that the canonical still names design.weekndlabs.com while these links
name weekndlabs.com/design. That is deliberate to leave alone for now, but the
two disagree and it is worth settling.

This branch was successfully deployed

1 active deployment
Preview — 719d023b Deployed Jul 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant