🐛 Specify canonical url as frontside.com/graphgen with staticalize - #74
Merged
Merged
Conversation
This was referenced Sep 28, 2026
Closed
cowboyd
approved these changes
Sep 29, 2026
frontside.com proxies this site and serves the same pages, so the two origins are duplicates of each other. Nothing said which one is the original: the docs emitted no canonical at all, and the deploy staticalized with `--base=https://graphgen-data.netlify.app`, so every link and every sitemap entry named the hosting url rather than the one readers visit. Two identical sites and no signal is how they end up competing for the same searches instead of counting as one page. Neither origin has a robots.txt either, so nothing else settles it. The docs pages now name the url they are read at, built from the request so that a local crawl still names localhost. staticalize 0.3.1 rewrites it onto `--canonical` while the rest of the build stays on `--base`, so the Netlify copy remains readable on its own and its sitemap still says so. Only `routes/docs/[...slug].tsx` needs it: `index.tsx` is a 307 with no markup, and `[name].tsx` is not in the sitemap. staticalize comes from npm rather than jsr. Deno's minimum dependency age refuses a jsr version for its first 24 hours, and both deploy jobs run this task, so a jsr specifier would fail every deploy on the day of a release. npm resolution is not subject to it. The package publishes a `bin` rather than a `/cli` export, so the specifier loses its subpath. 0.3.1 also restored the default for `--retries`, so the flag 0.3.0 forced us to pass goes away with it. thefrontside/effection#1255 and thefrontside/interactors#333 make the same move; `fix-static-css.ts` only rewrites Twind css in html and is unaffected.
taras
force-pushed
the
fix/canonical-frontside-home
branch
from
September 30, 2026 11:52
faa1899 to
3324c95
Compare
|
🚀 Deploy Preview Ready!
|
This was referenced Sep 30, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
frontside.com proxies this site at
/graphgenand serves the same pages, so thetwo origins are duplicates of each other. Nothing says which one is the
original:
<link rel="canonical">at all--base=https://graphgen-data.netlify.app, soevery internal link and every sitemap entry names the hosting url rather than
the one readers visit
Two identical sites and no signal is how they end up competing for the same
searches instead of counting as one page. Neither origin has a
robots.txteither, so nothing else settles it.
Effection had the same problem and thefrontside/effection#1248 fixed it;
thefrontside/interactors#333 does the same for Interactors. Graphgen is the
worst of the three, because it never had a canonical to point anywhere.
Approach
Two small pieces.
The docs pages name the url they are read at, built from the request rather
than hardcoded, so a local crawl still names localhost and only a deploy names
frontside.com:
Only
routes/docs/[...slug].tsxneeds it.index.tsxis a 307 redirect with nomarkup, and
[name].tsxis a demo page that is not in the sitemap.The base is that url, so staticalize rewrites the canonical along with the
links and the sitemap:
staticalize 0.3.1 rewrites it onto
--canonicalwhile the rest of the build —links, assets, the sitemap — stays on
--base. So the Netlify copy remainsreadable on its own and its sitemap still names the origin it is served from,
which is also what keeps frontside.com's proxy mounting it correctly.
The task takes staticalize from npm rather than jsr. Deno's minimum
dependency age refuses a jsr version for its first 24 hours, and both deploy
jobs run this task, so a jsr specifier would fail every deploy on the day of a
staticalize release. npm resolution is not subject to it. The package publishes
a
binrather than a/cliexport, so the specifier loses its subpath.0.3.1 also restored the default for
--retries, so the flag 0.3.0 forced us topass goes away with it.
fix-static-css.tsstill runs afterwards and is unaffected: it walks.htmlfiles replacing Twind CSS and state, and does not touch urls.
Tests
Ran the site and staticalized it against the new base:
Served locally without the base, the same page correctly names localhost:
Rebased onto
v1now that #75 is in, which is also what makes this runnable:www/deno.lockhad stale integrity hashes and the site would not startwithout
--no-lock. It does now, so this was verified through the realdeno task staticalize,fix-static-css.tsand all:deno fmt --check,deno lintanddeno task test(10 passed, 82 steps) areall green on the rebased branch.
Merge order
None. Keeping the sitemap on
--basemeans its entries stay site-relative, sofrontside.com's proxy mounts them exactly as it always has — which is the whole
point of the
--base/--canonicalsplit. thefrontside/frontside.com#509 isstill worth landing as insurance, but this no longer waits on it.
Worth confirming
This assumes
frontside.com/graphgenis the intended public home andgraphgen-data.netlify.appis hosting. That matches how Effection andInteractors are set up. If Graphgen is meant to stand on its own domain instead,
the right change is the opposite one — keep the base and stop proxying it — and
this PR should be closed.