Skip to content

feat: serve the site under the /smg base path - #25

Merged
slin1237 merged 1 commit into
mainfrom
feat/smg-base-path
Aug 1, 2026
Merged

feat: serve the site under the /smg base path#25
slin1237 merged 1 commit into
mainfrom
feat/smg-base-path

Conversation

@slin1237

@slin1237 slin1237 commented Aug 1, 2026

Copy link
Copy Markdown
Member

What

Phase 2 of the domain plan: mount the docs at https://lightseek.org/smg (the URL the existing smg.lightseek.org vanity redirect already points to). An edge proxy on the lightseek.org zone forwards /smg* to this Pages project path-preserving, so the app itself must live under /smg.

  • kit.paths.base = '/smg'
  • Nav config data carries the base (single source of truth — active-state comparisons keep working unchanged)
  • Markdown pipeline (links.ts) prefixes rewritten doc links, lightseek.org/smg/... links, and image paths with the base
  • Hardcoded hrefs in SiteHeader/SiteFooter/HomeHero/HomeChoosePath and favicon/logo asset paths now go through $app/paths
  • Root _redirects (/ → /smg 302) so the bare smg-anw.pages.dev host doesn't 404

Verification

Production build under wrangler pages dev:

  • / → 302 → /smg; /smg → 308 → /smg/ (SvelteKit canonicalization) → 200
  • Header nav renders /smg/getting-started|concepts|reference|contributing
  • Deep route /smg/concepts/architecture/overview → 200; markdown-embedded images resolve (relative and rewritten paths)
  • D1-backed hero content served on the home page
  • pnpm build / pnpm lint / pnpm check all clean

Rollout

Merging deploys this to smg-anw.pages.dev/smg. After that, the zone-side snippet on lightseek.org (/smg* → proxy to the Pages host) goes live and https://lightseek.org/smg serves the docs; smg.lightseek.org starts resolving via its existing 301.

🤖 Generated with Claude Code

Set kit.paths.base to /smg so the site can be mounted at
lightseek.org/smg behind an edge proxy while staying fully functional
on its *.pages.dev origin.

Internal URLs are made base-aware at their sources of truth: nav config
data, the markdown link and asset rewriters, and the handful of
hardcoded hrefs in components. Favicons and logo assets go through
$app/paths so SvelteKit's relative asset resolution keeps working from
any mount point. A root _redirects rule sends the bare origin host to
/smg so old links do not 404.

Verified against the production build under wrangler pages dev:
root redirect, base-prefixed nav and markdown links, D1-backed hero
content, and static/markdown image resolution.

Signed-off-by: Simo Lin <25425177+slin1237@users.noreply.github.com>
@slin1237
slin1237 merged commit 9a6440a into main Aug 1, 2026
5 checks passed
@slin1237
slin1237 deleted the feat/smg-base-path branch August 1, 2026 04:50
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