Commit f433efc
authored
feat(ui-website): env-driven sibling URLs with localhost dev fallbacks (#42)
The UI website hardcoded `https://webjs.dev` and `https://docs.webjs.dev`
as the defaults for its header + footer links. Local dev navigated off
the localhost dev cluster as soon as you clicked the Webjs / Docs links,
which broke the flow when working across all three apps simultaneously.
Mirror the pattern the root website (`website/app/layout.ts`) already
uses:
- Flip the WEBSITE_URL / DOCS_URL defaults to the canonical localhost
ports (`http://localhost:5000`, `http://localhost:4000`), matching
each sibling app's `webjs:dev --port` flag.
- Replace the one hardcoded `https://webjs.dev` link in the footer with
the WEBSITE_URL constant (was a missed substitution).
- Add `.env.example` documenting the same defaults so deployment env
overrides have something to point at.
- AGENTS.md table covering env var name, local fallback, production
value, plus a note that copying .env.example is only needed when
overriding (the fallbacks already match local).
Deploys (ui.webjs.dev on Railway) MUST set WEBSITE_URL=https://webjs.dev
and DOCS_URL=https://docs.webjs.dev in service env vars; otherwise the
header + footer will link to the localhost ports in production. Adding
that step to the deployment runbook is part of this commit's intent
(see the AGENTS.md table).1 parent 11a746b commit f433efc
3 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
106 | 121 | | |
107 | 122 | | |
108 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
4 | 15 | | |
5 | | - | |
6 | | - | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
| |||
310 | 321 | | |
311 | 322 | | |
312 | 323 | | |
313 | | - | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
| |||
0 commit comments